401 if os.path.exists("/Developer/Applications/Eric5"): |
401 if os.path.exists("/Developer/Applications/Eric5"): |
402 shutil.rmtree("/Developer/Applications/Eric5") |
402 shutil.rmtree("/Developer/Applications/Eric5") |
403 if os.path.exists("/Applications/" + macAppBundleName): |
403 if os.path.exists("/Applications/" + macAppBundleName): |
404 shutil.rmtree("/Applications/" + macAppBundleName) |
404 shutil.rmtree("/Applications/" + macAppBundleName) |
405 |
405 |
406 except IOError as msg: |
406 except (IOError, OSError) as msg: |
407 sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) |
407 sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) |
408 exit(7) |
|
409 |
|
410 except OSError as msg: |
|
411 sys.stderr.write('OSError: {0}\nTry install with admin rights.\n'.format(msg)) |
|
412 exit(7) |
408 exit(7) |
413 |
409 |
414 |
410 |
415 def shutilCopy(src, dst, perm=0o644): |
411 def shutilCopy(src, dst, perm=0o644): |
416 """ |
412 """ |
520 shutilCopy('{1}{0}LICENSE.GPL3'.format(os.sep, sourceDir), cfg['ericDir']) |
516 shutilCopy('{1}{0}LICENSE.GPL3'.format(os.sep, sourceDir), cfg['ericDir']) |
521 |
517 |
522 # create the global plugins directory |
518 # create the global plugins directory |
523 createGlobalPluginsDir() |
519 createGlobalPluginsDir() |
524 |
520 |
525 except IOError as msg: |
521 except (IOError, OSError) as msg: |
526 sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) |
522 sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) |
527 return(7) |
|
528 |
|
529 except OSError as msg: |
|
530 sys.stderr.write('OSError: {0}\nTry install with admin rights.\n'.format(msg)) |
|
531 return(7) |
523 return(7) |
532 |
524 |
533 # copy some text files to the doc area |
525 # copy some text files to the doc area |
534 for name in ["LICENSE.GPL3", "THANKS", "changelog"]: |
526 for name in ["LICENSE.GPL3", "THANKS", "changelog"]: |
535 try: |
527 try: |