##// END OF EJS Templates
Add local variable for normalized virtualenv path
Eric Galloway -
Show More
@@ -741,7 +741,8 b' class InteractiveShell(SingletonConfigurable):'
741 while os.path.islink(p):
741 while os.path.islink(p):
742 p = os.path.normcase(os.path.join(os.path.dirname(p), os.readlink(p)))
742 p = os.path.normcase(os.path.join(os.path.dirname(p), os.readlink(p)))
743 paths.append(p)
743 paths.append(p)
744 if any(p.startswith(os.path.normcase(os.environ['VIRTUAL_ENV'])) for p in paths):
744 p_venv = os.path.normcase(os.environ['VIRTUAL_ENV'])
745 if any(p.startswith(p_venv) for p in paths):
745 # Running properly in the virtualenv, don't need to do anything
746 # Running properly in the virtualenv, don't need to do anything
746 return
747 return
747
748
General Comments 0
You need to be logged in to leave comments. Login now