Wed, 12 Oct 2022 17:37:54 +0200
Only add the path of the main script to sys.path, if it is not already in.
src/eric7/eric7_ide.py | file | annotate | diff | comparison | revisions |
--- a/src/eric7/eric7_ide.py Wed Oct 12 17:37:24 2022 +0200 +++ b/src/eric7/eric7_ide.py Wed Oct 12 17:37:54 2022 +0200 @@ -34,7 +34,8 @@ ] restartArgs = [arg for arg in sys.argv[1:] if arg.split("=", 1)[0] in restartArgsList] -sys.path.insert(1, os.path.dirname(__file__)) +if os.path.dirname(__file__) not in sys.path: + sys.path.insert(1, os.path.dirname(__file__)) try: from PyQt6.QtCore import qWarning, QLibraryInfo, QTimer, QCoreApplication