scripts/uninstall.py

branch
eric7
changeset 8821
0485c183b718
parent 8820
149f941d072e
child 8881
54e42bc2437a
equal deleted inserted replaced
8820:149f941d072e 8821:0485c183b718
150 for name in ['ericExamplesDir', 'ericDocDir', 'ericDTDDir', 150 for name in ['ericExamplesDir', 'ericDocDir', 'ericDTDDir',
151 'ericCSSDir', 'ericIconDir', 'ericPixDir', 151 'ericCSSDir', 'ericIconDir', 'ericPixDir',
152 'ericTemplatesDir', 'ericCodeTemplatesDir', 152 'ericTemplatesDir', 'ericCodeTemplatesDir',
153 'ericOthersDir', 'ericStylesDir', 'ericThemesDir', 153 'ericOthersDir', 'ericStylesDir', 'ericThemesDir',
154 'ericDir']: 154 'ericDir']:
155 dirpath = getConfig(name) 155 with contextlib.suppress(AttributeError):
156 if os.path.exists(dirpath): 156 dirpath = getConfig(name)
157 shutil.rmtree(dirpath, True) 157 if os.path.exists(dirpath):
158 shutil.rmtree(dirpath, True)
158 159
159 # Cleanup translations 160 # Cleanup translations
160 for name in glob.glob( 161 for name in glob.glob(
161 os.path.join(getConfig('ericTranslationsDir'), 'eric7_*.qm')): 162 os.path.join(getConfig('ericTranslationsDir'), 'eric7_*.qm')):
162 if os.path.exists(name): 163 if os.path.exists(name):

eric ide

mercurial