scripts/install.py

branch
eric7
changeset 10403
ea3320d5e8e9
parent 10373
093dcebe5ecb
child 10417
c6011e501282
equal deleted inserted replaced
10402:1b63ffeca110 10403:ea3320d5e8e9
507 "ericThemesDir", 507 "ericThemesDir",
508 "ericDir", 508 "ericDir",
509 ]: 509 ]:
510 with contextlib.suppress(AttributeError): 510 with contextlib.suppress(AttributeError):
511 if os.path.exists(getConfig(name)): 511 if os.path.exists(getConfig(name)):
512 shutil.rmtree(getConfig(name), True) 512 shutil.rmtree(getConfig(name), ignore_errors=True)
513 513
514 # Cleanup translations 514 # Cleanup translations
515 for name in glob.glob( 515 for name in glob.glob(
516 os.path.join(getConfig("ericTranslationsDir"), "eric7_*.qm") 516 os.path.join(getConfig("ericTranslationsDir"), "eric7_*.qm")
517 ): 517 ):
2313 # cleanup old installation 2313 # cleanup old installation
2314 print("Cleaning up old installation ...", end="", flush=True) 2314 print("Cleaning up old installation ...", end="", flush=True)
2315 try: 2315 try:
2316 if doCleanup: 2316 if doCleanup:
2317 if distDir: 2317 if distDir:
2318 shutil.rmtree(distDir, True) 2318 shutil.rmtree(distDir, ignore_errors=True)
2319 else: 2319 else:
2320 cleanUp() 2320 cleanUp()
2321 except OSError as msg: 2321 except OSError as msg:
2322 sys.stderr.write("\nError: {0}\nTry install as root.\n".format(msg)) 2322 sys.stderr.write("\nError: {0}\nTry install as root.\n".format(msg))
2323 exit(7) 2323 exit(7)

eric ide

mercurial