There was an error while loading. Please reload this page.
1 parent 87b0a9c commit 60cf6a2Copy full SHA for 60cf6a2
1 file changed
bpython/curtsies.py
@@ -88,7 +88,8 @@ def request_refresh():
88
@wraps(orig_import)
89
def new_import(name, globals={}, locals={}, fromlist=[], level=-1):
90
m = orig_import(name, globals=globals, locals=locals, fromlist=fromlist)
91
- watcher.add_module(m.__file__)
+ if hasattr(m, "__file__"):
92
+ watcher.add_module(m.__file__)
93
return m
94
__builtins__['__import__'] = new_import
95
0 commit comments