scripts/uninstall.py

changeset 7210
8fe313d039e6
parent 6942
2602857055c5
child 7220
5cf645f6daab
diff -r d30ac02a5f04 -r 8fe313d039e6 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
@@ -27,11 +27,6 @@
 else:
     raw_input = input
 
-# 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()
@@ -75,6 +70,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