diff -r 51afc1818188 -r 792c2651fbd7 RefactoringRope/RefactoringClient.py --- a/RefactoringRope/RefactoringClient.py Mon May 10 20:14:08 2021 +0200 +++ b/RefactoringRope/RefactoringClient.py Tue May 11 19:31:36 2021 +0200 @@ -11,8 +11,19 @@ import os import contextlib +modulePath = sys.argv[-1] # it is always the last parameter +sys.path.insert(1, modulePath) + try: - from E5Network.E5JsonClient import E5JsonClient + import rope.base.project + import rope.base.libutils +except ImportError: + sys.exit(42) + +from ProgressHandle import ProgressHandle + +try: + from eric6.E5Network.E5JsonClient import E5JsonClient except ImportError: # TODO: delete JsonClient once ported to eric7 from JsonClient import JsonClient as E5JsonClient @@ -1497,15 +1508,7 @@ ' missing. Abort.') sys.exit(1) - host, port, projectPath, modulePath = sys.argv[1:] - - sys.path.insert(1, modulePath) - try: - import rope.base.project - import rope.base.libutils - from ProgressHandle import ProgressHandle - except ImportError: - sys.exit(42) + host, port, projectPath = sys.argv[1:-1] # Create a Qt5 application object in order to allow the processing of # modules containing Qt stuff.