Bug in Graph.get_subgraph

4 views
Skip to first unread message

fero

unread,
Jun 18, 2008, 10:11:00 AM6/18/08
to pydot
Hello, I use pydot.

Many compliments for it !

I'd like to file a "stupid" bug in Graph.get_subgraph method which
takes in input a name but then it tries to find object name from
sgraph.get_name()

Here is the patch, sorry if this is not the right place to file a bug

Thank you again, bye

--- pydot.py 2008-02-14 21:37:28.000000000 +0100
+++ pydot.py.new 2008-06-18 16:10:20.548717578 +0200
@@ -1327,9 +1327,9 @@

match = None

- if self.obj_dict['subgraphs'].has_key( sgraph.get_name() ):
+ if self.obj_dict['subgraphs'].has_key( name ):

- sgraphs_obj_dict =
self.obj_dict['subgraphs'].get( sgraph.get_name() )
+ sgraphs_obj_dict = self.obj_dict['subgraphs'].get( name )

for obj_dict_list in sgraphs_obj_dict:
match = [ Subgraph( obj_dict = obj_d ) for obj_d in
obj_dict_list ]

fero

unread,
Jun 18, 2008, 12:57:25 PM6/18/08
to pydot
Sorry... even with this patch it doesn't seem to work.

It fix the "NameError" exception, but it doesn't give the right result

Bye
fero
Reply all
Reply to author
Forward
0 new messages