Sun, 13 Oct 2024 12:03:05 +0200
Fixed an issue in the virtalenv manager caused by a defined virtual environment for an eric-ide server.
src/eric7/SystemUtilities/FileSystemUtilities.py | file | annotate | diff | comparison | revisions | |
src/eric7/VirtualEnv/VirtualenvManager.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/SystemUtilities/FileSystemUtilities.py Sat Oct 12 17:50:15 2024 +0200 +++ b/src/eric7/SystemUtilities/FileSystemUtilities.py Sun Oct 13 12:03:05 2024 +0200 @@ -703,6 +703,7 @@ ################################################################################ +# TODO: change these because the pattern collides with Windows drives _DeviceFileMarker = "device:" _RemoteFileMarker = "remote:"
--- a/src/eric7/VirtualEnv/VirtualenvManager.py Sat Oct 12 17:50:15 2024 +0200 +++ b/src/eric7/VirtualEnv/VirtualenvManager.py Sun Oct 13 12:03:05 2024 +0200 @@ -110,9 +110,11 @@ # only check for a non-embedded environment found = False for venvName in self.__virtualEnvironments: - with contextlib.suppress(FileNotFoundError): - if os.path.samefile( - defaultPy, self.__virtualEnvironments[venvName].interpreter + interpreter = self.__virtualEnvironments[venvName].interpreter + with contextlib.suppress(OSError): + if ( + not FileSystemUtilities.isRemoteFileName(interpreter) + and os.path.samefile(defaultPy, interpreter) ): found = True break