RefactoringRope/Refactoring.py

changeset 151
5260100b6700
parent 150
81aa22f5d2e6
child 160
989cd767992b
--- a/RefactoringRope/Refactoring.py	Wed Mar 08 19:35:56 2017 +0100
+++ b/RefactoringRope/Refactoring.py	Tue Mar 28 19:36:35 2017 +0200
@@ -911,8 +911,9 @@
         """
         if handle is not None:
             handle.reset()
-        if str(type(err)).split()[-1][1:-2].split('.')[-1] == \
-                'ModuleSyntaxError':
+        ropeError = str(type(err)).split()[-1]
+        ropeError = ropeError[1:-2].split('.')[-1]
+        if ropeError == 'ModuleSyntaxError':
             res = E5MessageBox.warning(
                 self.__ui, title,
                 self.tr("Rope error: {0}").format(str(err)),
@@ -2109,11 +2110,11 @@
         if self.__helpDialog is None:
             from HelpDialog import HelpDialog
             if sys.version_info[0] >= 3:
-                dir = 'rope_py3'
+                directory = 'rope_py3'
             else:
-                dir = 'rope_py2'
+                directory = 'rope_py2'
             helpfile = os.path.join(os.path.dirname(__file__),
-                                    dir, "rope", "docs", "overview.txt")
+                                    directory, "rope", "docs", "overview.txt")
             self.__helpDialog = \
                 HelpDialog(self.tr("Help about rope refactorings"),
                            helpfile)

eric ide

mercurial