Changeset 8bbc504 for fedd


Ignore:
Timestamp:
Jun 18, 2009 6:43:23 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
b57df44
Parents:
a9ed7d7
Message:

proper quoting on host and link names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd_client.py

    ra9ed7d7 r8bbc504  
    474474
    475475        for n in d.get('node', []):
    476             print >>dotfile, '\t%s [shape=box,style=filled,\\' % n['vname']
     476            print >>dotfile, '\t"%s" [shape=box,style=filled,\\' % n['vname']
    477477            print >>dotfile, '\t\tcolor=black,fillcolor="#60f8c0",regular=1]'
    478478
     
    500500        # Encode the lans and the links
    501501        for l in lans.keys():
    502             print >>dotfile, '\t%s [shape=ellipse, style=filled,\\' % l
     502            print >>dotfile, '\t"%s" [shape=ellipse, style=filled,\\' % l
    503503            print >>dotfile,'\t\tcolor=black,fillcolor="#80c0f8",regular=1]'
    504504            for n in lans[l]:
    505505                if labels:
    506                     print >>dotfile, '\t%s -- %s [headlabel="%s"]' % \
     506                    print >>dotfile, '\t"%s" -- "%s" [headlabel="%s"]' % \
    507507                            (l, n[0], n[1])
    508508                else:
    509                     print >>dotfile, '\t%s -- %s' % (l, n[0])
     509                    print >>dotfile, '\t"%s" -- "%s"' % (l, n[0])
    510510
    511511        for k, l in links.items():
     
    513513                if labels:
    514514                    print >>dotfile, \
    515                             ('\t%s -- %s [label="%s",taillabel="%s",' + \
     515                            ('\t"%s" -- "%s" [label="%s",taillabel="%s",' + \
    516516                            'headlabel="%s"]') % \
    517517                            (l[0][0], l[1][0], k, l[0][1], l[1][1])
    518518                else:
    519                     print >>dotfile, '\t%s -- %s ' % (l[0][0], l[1][0])
     519                    print >>dotfile, '\t"%s" -- "%s" ' % (l[0][0], l[1][0])
    520520
    521521        print >>dotfile, "}"
Note: See TracChangeset for help on using the changeset viewer.