#195 Epydoc3.0b1 fails to parse extensions to the Exception class

v3.0
closed-fixed
nobody
5
2007-07-10
2007-04-02
Anonymous
No

% cat ./foo.py
"""This extends Exception."""

def addInfo(self, message):
"""
Append a message to an exception.
"""

if not hasattr(self, '_messages'):
self._messages = []

self._messages.append(message)

Exception.addInfo = addInfo

% epydoc ./foo.py
Error: Internal error during parsing (/tmp/test/bug/foo.py, line 14):
_Sentinel instance has no attribute 'remove'

UNEXPECTED ERROR:
_Sentinel instance has no attribute 'remove'

Use --debug to see trace information.

% epydoc ./foo.py --debug
Error: Internal error during parsing (/tmp/test/bug/foo.py, line 14):
_Sentinel instance has no attribute 'remove'
Traceback (most recent call last):
File "/usr/local/bin/epydoc", line 13, in ?
cli()
File "/usr/local/lib/python2.3/site-packages/epydoc/cli.py", line 946, in cli
main(options, names)
File "/usr/local/lib/python2.3/site-packages/epydoc/cli.py", line 738, in main exclude_parse=exclude_parse)
File "/usr/local/lib/python2.3/site-packages/epydoc/docbuilder.py", line 205, in build_doc_index
doc_pairs = _get_docs_from_items(items, options)
File "/usr/local/lib/python2.3/site-packages/epydoc/docbuilder.py", line 333, in _get_docs_from_items
doc_pairs.append(_get_docs_from_module_file(
File "/usr/local/lib/python2.3/site-packages/epydoc/docbuilder.py", line 533, in _get_docs_from_module_file
parse_doc = parse_docs(
File "/usr/local/lib/python2.3/site-packages/epydoc/docparser.py", line 278, in parse_docs
process_file(module_doc)
File "/usr/local/lib/python2.3/site-packages/epydoc/docparser.py", line 631, in process_file
lineno, comments, decorators, encoding)
File "/usr/local/lib/python2.3/site-packages/epydoc/docparser.py", line 766, in process_line
return process_assignment(*args)
File "/usr/local/lib/python2.3/site-packages/epydoc/docparser.py", line 1141, in process_assignment
set_variable(lhs_parent, var_doc, True)
File "/usr/local/lib/python2.3/site-packages/epydoc/docparser.py", line 1824, in set_variable
namespace.sort_spec.remove(var_doc.name)
AttributeError: _Sentinel instance has no attribute 'remove'

Discussion

  • Logged In: YES
    user_id=1053920
    Originator: NO

    fixed in r1592

     
    • status: open --> closed-fixed