RefactoringRope/CodeAssistClient.py

branch
eric7
changeset 381
88ef06966203
parent 374
958f34e97952
child 389
4f53795beff0
diff -r 02b38ad777be -r 88ef06966203 RefactoringRope/CodeAssistClient.py
--- a/RefactoringRope/CodeAssistClient.py	Mon Feb 07 11:23:50 2022 +0100
+++ b/RefactoringRope/CodeAssistClient.py	Mon Jun 20 10:48:14 2022 +0200
@@ -11,7 +11,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
@@ -508,10 +508,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 = CodeAssistClient(host, int(port), idString, projectPath)
     # Start the main loop

eric ide

mercurial