From 89c8665a53d2e6e0f2d6f5e08d00973358cf6a58 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 15 Jun 2006 17:54:07 +0000 Subject: Add -r flag to produce dot output git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1885 ce84e21b-d406-0410-9b95-82705330c041 --- tools/groups-to-dot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/groups-to-dot.py b/tools/groups-to-dot.py index fa384c294..ffb1018e6 100755 --- a/tools/groups-to-dot.py +++ b/tools/groups-to-dot.py @@ -10,11 +10,14 @@ colors = ['steelblue1', 'chartreuse', 'gold', 'magenta', 'indianred1', 'limegree if __name__ == '__main__': if len(sys.argv) < 2: - print "Usage groups-to-dot.py [-b] [-h] -o " + print "Usage groups-to-dot.py [-r] [-b] [-h] -o " raise SystemExit, 1 groups = lxml.etree.parse(sys.argv[-1] + '/groups.xml').getroot() clients = lxml.etree.parse(sys.argv[-1] + '/clients.xml').getroot() - dotpipe = popen2.Popen4("dot -Tpng") + if '-r' in sys.argv: + dotpipe = popen2.Popen4("dd 2>/dev/null") + else: + dotpipe = popen2.Popen4("dot -Tpng") categories = {'default':'grey83'} instances = {} for group in groups.findall('Group'): -- cgit v1.2.3-1-g7c22