mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-10-04 17:46:31 +08:00
Doing the check the other way round..
This commit is contained in:
parent
839bc1fec8
commit
102e13b152
@ -14,8 +14,8 @@ import sys
|
|||||||
# the system instead of the one provided with Cura, which causes
|
# the system instead of the one provided with Cura, which causes
|
||||||
# incompatibility issues with libArcus
|
# incompatibility issues with libArcus
|
||||||
if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used
|
if "PYTHONPATH" in os.environ.keys(): # If PYTHONPATH is used
|
||||||
if sys.path[-1] == os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly at the end of sys.path.
|
if sys.path[1] != os.environ["PYTHONPATH"]: # .. check whether PYTHONPATH is placed incorrectly.
|
||||||
sys.path.pop(-1) # If so remove that element..
|
sys.path.remove(os.environ["PYTHONPATH"]) # If so remove that element..
|
||||||
sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again.
|
sys.path.insert(1, os.environ['PYTHONPATH']) # and add it at the correct place again.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user