mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Make ready_to_import always remove tempdir from sys.path (re-apply #6687)
This commit is contained in:
1 parent
005014a3f9
commit
3836958eaa
1 file changed
+1
-1
Vendored
+1
-1
@@ -305,8 +305,8 @@ def ready_to_import(name=None, source=""):
|
||||
try:
|
||||
sys.path.insert(0, tempdir)
|
||||
yield name, path
|
||||
sys.path.remove(tempdir)
|
||||
finally:
|
||||
sys.path.remove(tempdir)
|
||||
if old_module is not None:
|
||||
sys.modules[name] = old_module
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user