help doesn't work for logger module

Bug #122984 reported by Noah Slater
2
Affects Status Importance Assigned to Milestone
python2.4 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: python2.3

The help function doesn't work for the logger module. Here is a traceback:

Python 2.4.4c1 (#2, Oct 11 2006, 19:53:58)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help("logging")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site.py", line 339, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib/python2.4/pydoc.py", line 1656, in __call__
    self.help(request)
  File "/usr/lib/python2.4/pydoc.py", line 1698, in help
    elif request: doc(request, 'Help on %s:')
  File "/usr/lib/python2.4/pydoc.py", line 1483, in doc
    pager(title % desc + '\n\n' + text.document(object, name))
  File "/usr/lib/python2.4/pydoc.py", line 303, in document
    if inspect.ismodule(object): return self.docmodule(*args)
  File "/usr/lib/python2.4/pydoc.py", line 1077, in docmodule
    contents.append(self.document(value, key, name))
  File "/usr/lib/python2.4/pydoc.py", line 304, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "/usr/lib/python2.4/pydoc.py", line 1201, in docclass
    lambda t: t[1] == 'method')
  File "/usr/lib/python2.4/pydoc.py", line 1151, in spill
    name, mod, object))
  File "/usr/lib/python2.4/pydoc.py", line 305, in document
    if inspect.isroutine(object): return self.docroutine(*args)
  File "/usr/lib/python2.4/pydoc.py", line 1262, in docroutine
    doc = getdoc(object) or ''
  File "/usr/lib/python2.4/pydoc.py", line 75, in getdoc
    result = inspect.getdoc(object) or inspect.getcomments(object)
  File "/usr/lib/python2.4/inspect.py", line 448, in getcomments
    lines, lnum = findsource(object)
  File "/usr/lib/python2.4/inspect.py", line 437, in findsource
    if pat.match(lines[lnum]): break
IndexError: list index out of range

Revision history for this message
Jeremy Teale (jteale) wrote :

Thanks for reporting. This is Python 2.4.4c1, not 2.3.

Revision history for this message
Matthias Klose (doko) wrote :

this works with both 2.4 and 2.5 in current gutsy

Changed in python2.4:
status: New → Fix Released
Revision history for this message
Stuart Langridge (sil) wrote :

This is failing in current hardy.

Revision history for this message
Stuart Langridge (sil) wrote :

Oops. Ignore previous comment; it is working in hardy.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.