Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9fa5e7e

Browse files
fix hacky __import__ override
fixes#418
1 parent20f0b3b commit9fa5e7e

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
ifself.watcher:
342-
old_module_locations= {}# forreadding modules if they fail to load
342+
old_module_locations= {}# forreading modules if they fail to load
343343
@functools.wraps(self.orig_import)
344344
defnew_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
ifnameinold_module_locations:
349349
loc=old_module_locations[name]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp