[Epydoc-commits] SF.net SVN: epydoc:[1812] trunk/epydoc/src/epydoc/docwriter
Brought to you by:
edloper
From: <ed...@us...> - 2009-02-03 22:11:41
|
Revision: 1812 http://epydoc.svn.sourceforge.net/epydoc/?rev=1812&view=rev Author: edloper Date: 2009-02-03 21:31:04 +0000 (Tue, 03 Feb 2009) Log Message: ----------- increased robustness vs random exceptions Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py trunk/epydoc/src/epydoc/docwriter/plaintext.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2009-02-03 21:29:51 UTC (rev 1811) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2009-02-03 21:31:04 UTC (rev 1812) @@ -3468,11 +3468,12 @@ if label is None: label = plaintext_to_html(identifier) # Find the APIDoc for it (if it's available). - doc = self.docindex.find(identifier, self.container) + try: doc = self.docindex.find(identifier, self.container, True) + except: doc = 'notfound' # If we didn't find a target, then try checking in the contexts # of the ancestor classes. - if doc is None and isinstance(self.container, RoutineDoc): + if doc == 'notfound' and isinstance(self.container, RoutineDoc): container = self.docindex.get_vardoc( self.container.canonical_name) while (doc is None and container not in (None, UNKNOWN) @@ -3481,8 +3482,9 @@ doc = self.docindex.find(identifier, container) # Translate it into HTML. - if doc is None: - self._failed_xref(identifier) + if doc in (None, 'notfound'): + if doc == 'notfound': + self._failed_xref(identifier) return '<code class="link">%s</code>' % label else: return self.htmlwriter.href(doc, label, 'link') Modified: trunk/epydoc/src/epydoc/docwriter/plaintext.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/plaintext.py 2009-02-03 21:29:51 UTC (rev 1811) +++ trunk/epydoc/src/epydoc/docwriter/plaintext.py 2009-02-03 21:31:04 UTC (rev 1812) @@ -72,7 +72,7 @@ s += str(base.canonical_name[-1]) else: s += str(base.canonical_name) - if i < len(class_doc.bases)-1: out(', ') + if i < len(class_doc.bases)-1: s += ', ' return s+')' def write_class(self, out, class_doc, name=None, prefix='', verbose=True): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |