RefactoringRope/RefactoringClient.py

branch
eric7
changeset 381
88ef06966203
parent 375
c61a2f18ed78
child 385
9bbd74b51d88
diff -r 02b38ad777be -r 88ef06966203 RefactoringRope/RefactoringClient.py
--- a/RefactoringRope/RefactoringClient.py	Mon Feb 07 11:23:50 2022 +0100
+++ b/RefactoringRope/RefactoringClient.py	Mon Jun 20 10:48:14 2022 +0200
@@ -12,7 +12,7 @@
 import contextlib
 
 modulePath = sys.argv[-1]   # it is always the last parameter
-sys.path.insert(1, modulePath)
+sys.path.append(modulePath)
 
 try:
     import rope.base.project
@@ -1511,10 +1511,10 @@
     # modules containing Qt stuff.
     try:
         from PyQt6.QtCore import QCoreApplication
-    except ImportError:
+    except (ImportError, RuntimeError):
         QCoreApplication = None
     if QCoreApplication is not None:
-        app = QCoreApplication(sys.argv)
+        app = QCoreApplication([])
     
     client = RefactoringClient(host, int(port), projectPath)
     # Start the main loop

eric ide

mercurial