--- 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): """