scripts/uninstall.py

branch
without_py2_and_pyqt4
changeset 7211
1c97f3142fa8
parent 7203
2079ccbfa335
child 7220
5cf645f6daab
diff -r ad27005f08ac -r 1c97f3142fa8 scripts/uninstall.py
--- a/scripts/uninstall.py	Wed Sep 04 20:01:53 2019 +0200
+++ b/scripts/uninstall.py	Thu Sep 05 18:47:56 2019 +0200
@@ -18,11 +18,6 @@
 import glob
 import distutils.sysconfig
 
-# get a local eric6config.py out of the way
-if os.path.exists("eric6config.py"):
-    os.rename("eric6config.py", "eric6config.py.orig")
-from eric6config import getConfig
-
 # Define the globals.
 progName = None
 currDir = os.getcwd()
@@ -58,6 +53,19 @@
     
     sys.exit(rcode)
 
+# get a local eric6config.py out of the way
+if os.path.exists("eric6config.py"):
+    os.rename("eric6config.py", "eric6config.py.orig")
+try:
+    from eric6config import getConfig
+except ImportError:
+    print("The eric6 IDE doesn't seem to be installed. Aborting.")
+    exit(1)
+except SyntaxError:
+    # an incomplete or old config file was found
+    print("The eric6 IDE seems to be installed incompletely. Aborting.")
+    exit(1)
+
 
 def usage(rcode=2):
     """

eric ide

mercurial