Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da79389 commit c99e0f1Copy full SHA for c99e0f1
1 file changed
Lib/inspect.py
@@ -173,7 +173,7 @@ def getfile(object):
173
return object.__file__
174
raise TypeError, 'arg is a built-in module'
175
if isclass(object):
176
- object = sys.modules[object.__module__]
+ object = sys.modules.get(object.__module__)
177
if hasattr(object, '__file__'):
178
179
raise TypeError, 'arg is a built-in class'
0 commit comments