Skip to content

Commit 9fa5e7e

Browse files
fix hacky __import__ override
fixes #418
1 parent 20f0b3b commit 9fa5e7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@ def __enter__(self):
339339

340340
self.orig_import = __builtins__['__import__']
341341
if self.watcher:
342-
old_module_locations = {} # for readding modules if they fail to load
342+
old_module_locations = {} # for reading modules if they fail to load
343343
@functools.wraps(self.orig_import)
344344
def new_import(name, globals={}, locals={}, fromlist=[], level=-1):
345345
try:
346-
m = self.orig_import(name, globals=globals, locals=locals, fromlist=fromlist)
346+
m = self.orig_import(name, globals=globals, locals=locals, fromlist=fromlist, level=level)
347347
except:
348348
if name in old_module_locations:
349349
loc = old_module_locations[name]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy