[Epydoc-commits] SF.net SVN: epydoc: [1274] trunk/epydoc/src/epydoc/docwriter/dotgraph.py
Brought to you by:
edloper
From: <ed...@us...> - 2006-08-21 12:14:52
|
Revision: 1274 Author: edloper Date: 2006-08-21 05:14:48 -0700 (Mon, 21 Aug 2006) ViewCVS: http://svn.sourceforge.net/epydoc/?rev=1274&view=rev Log Message: ----------- - fixed sf bug [ 1511214 ] uml error. This involved an exception raised because the uml graph tried to create a class node for non-class objects. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/dotgraph.py Modified: trunk/epydoc/src/epydoc/docwriter/dotgraph.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2006-08-21 11:49:30 UTC (rev 1273) +++ trunk/epydoc/src/epydoc/docwriter/dotgraph.py 2006-08-21 12:14:48 UTC (rev 1274) @@ -420,6 +420,9 @@ the types of a linked attributes if no node yet exists for that type. """ + if not isinstance(class_doc, ClassDoc): + raise TypeError('Expected a ClassDoc as 1st argument') + self.class_doc = class_doc """The class represented by this node.""" @@ -591,6 +594,9 @@ type_doc = self.linker.docindex.find(type_str, var) if not type_doc: return False + # Make sure the type is a class. + if not isinstance(type_doc, ClassDoc): return False + # Get the type ValueDoc's node. If it doesn't have one (and # add_nodes_for_linked_attributes=True), then create it. type_node = nodes.get(type_doc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |