Sat, 11 Dec 2021 16:47:26 +0100
Ignore unknown configuration keys during cleanup of install.py and uninstall.py.
scripts/install.py | file | annotate | diff | comparison | revisions | |
scripts/uninstall.py | file | annotate | diff | comparison | revisions |
diff -r 149f941d072e -r 0485c183b718 scripts/install.py --- a/scripts/install.py Sat Dec 11 16:04:36 2021 +0100 +++ b/scripts/install.py Sat Dec 11 16:47:26 2021 +0100 @@ -539,8 +539,9 @@ 'ericTemplatesDir', 'ericCodeTemplatesDir', 'ericOthersDir', 'ericStylesDir', 'ericThemesDir', 'ericDir']: - if os.path.exists(getConfig(name)): - shutil.rmtree(getConfig(name), True) + with contextlib.suppress(AttributeError): + if os.path.exists(getConfig(name)): + shutil.rmtree(getConfig(name), True) # Cleanup translations for name in glob.glob( @@ -761,7 +762,7 @@ copyTree( os.path.join(eric7SourceDir, "Themes"), cfg['ericThemesDir'], - ['*.qss', '*.ethj']) + ['*.ethj']) copyTree( os.path.join(eric7SourceDir, "i18n"), cfg['ericTranslationsDir'],
diff -r 149f941d072e -r 0485c183b718 scripts/uninstall.py --- 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(