mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
have to delete all pype modules from sys.modules
This commit is contained in:
parent
c59cb621b7
commit
cae34382a4
1 changed files with 6 additions and 2 deletions
8
start.py
8
start.py
|
|
@ -508,9 +508,13 @@ def boot():
|
|||
os.environ["PYPE_ROOT"], "repos")
|
||||
|
||||
# delete Pype module from cache so it is used from specific version
|
||||
modules_to_del = []
|
||||
for module_name in sys.modules:
|
||||
if module_name == "pype" or module_name.startswith("pype."):
|
||||
modules_to_del.append(module_name)
|
||||
try:
|
||||
del sys.modules["pype"]
|
||||
del sys.modules["pype.version"]
|
||||
for module_name in modules_to_del:
|
||||
del sys.modules[module_name]
|
||||
except AttributeError:
|
||||
pass
|
||||
except KeyError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue