pombreda / python-graph

Automatically exported from code.google.com/p/python-graph
Other
0 stars 0 forks source link

pygraph.readwrite.dot.write gives error when G.name is defined #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Graph G
2. G.name='ABC'
3. import pygraph.readwrite.dot.write as pgrd
4. dot=pgrd.write(G,weighted=True)

What is the expected output? What do you see instead?
the name of the graph should be there in dot string

I get an error - 
AttributeError: type object 'graph' has no attribute 'name'

What version of the product are you using? On what operating system?
Ubuntu, python 2.6 compatible

Please provide any additional information below.

Line 161 in dot.py has error:

The following has error in the last line.
    if not 'name' in dir(G):
        dotG.set_name('graphname')
    else:
        dotG.set_name(graph.name)

It should say:
        dotG.set_name(G.name)

Original issue reported on code.google.com by singh.da...@gmail.com on 19 Mar 2010 at 5:30

GoogleCodeExporter commented 9 years ago
Already fixed in trunk. :)

Original comment by pmatiello on 20 Mar 2010 at 9:59