Skip to content

Instantly share code, notes, and snippets.

Created March 8, 2015 15:40
Show Gist options
  • Save anonymous/eabe6e2ccab99671a076 to your computer and use it in GitHub Desktop.
Save anonymous/eabe6e2ccab99671a076 to your computer and use it in GitHub Desktop.
Issue attachments for pydot/pydot-ng#92: https://github.com/pydot/pydot-ng/issues/92
--- /usr/lib/python2.6/site-packages/pydot.pydot2014-06-12 06:22:57.000000000 +0400
+++ virtenv/lib/python2.6/site-packages/pydot.pydot2014-06-12 06:58:20.478835432 +0400
@@ -834,6 +834,11 @@
return False
+ def __hash__(self):
+ if self.get_parent_graph().get_top_graph_type() == 'graph':
+ return hash(min(self.get_source(), self.get_destination())
+ + max(self.get_source(), self.get_destination()))
+ return hash(self.get_source() + self.get_destination())
def parse_node_ref(self, node_str):
@@ -1455,7 +1460,7 @@
edge = Edge(obj_dict=obj)
- if self.obj_dict.get('simplify', False) and elm in edges_done:
+ if self.obj_dict.get('simplify', False) and edge in edges_done:
continue
graph.append( edge.to_string() + '\n' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment