scripts/uninstall.py

branch
eric7
changeset 8821
0485c183b718
parent 8820
149f941d072e
child 8881
54e42bc2437a
--- a/scripts/uninstall.py	Sat Dec 11 16:04:36 2021 +0100
+++ b/scripts/uninstall.py	Sat Dec 11 16:47:26 2021 +0100
@@ -152,9 +152,10 @@
                      'ericTemplatesDir', 'ericCodeTemplatesDir',
                      'ericOthersDir', 'ericStylesDir', 'ericThemesDir',
                      'ericDir']:
-            dirpath = getConfig(name)
-            if os.path.exists(dirpath):
-                shutil.rmtree(dirpath, True)
+            with contextlib.suppress(AttributeError):
+                dirpath = getConfig(name)
+                if os.path.exists(dirpath):
+                    shutil.rmtree(dirpath, True)
         
         # Cleanup translations
         for name in glob.glob(

eric ide

mercurial