[New-bugs-announce] [issue24008] inspect.getsource is failing for sys.excepthook

Anand Reddy Pandikunta report at bugs.python.org
Sun Apr 19 20:53:57 CEST 2015


New submission from Anand Reddy Pandikunta:

>>> inspect.getsource(sys.excepthook)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/inspect.py", line 701, in getsource
    lines, lnum = getsourcelines(object)
  File "/usr/local/lib/python2.7/inspect.py", line 690, in getsourcelines
    lines, lnum = findsource(object)
  File "/usr/local/lib/python2.7/inspect.py", line 526, in findsource
    file = getfile(object)
  File "/usr/local/lib/python2.7/inspect.py", line 420, in getfile
    'function, traceback, frame, or code object'.format(object))
TypeError: <built-in function excepthook> is not a module, class, method, function, traceback, frame, or code object

----------
components: Library (Lib)
files: trace4.py
messages: 241537
nosy: ChillarAnand
priority: normal
severity: normal
status: open
title: inspect.getsource is failing for sys.excepthook
versions: Python 2.7
Added file: http://bugs.python.org/file39124/trace4.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24008>
_______________________________________


More information about the New-bugs-announce mailing list