Sat, 16 Feb 2013 16:00:16 +0100
Fixed an issue in the install script.
install.py | file | annotate | diff | comparison | revisions |
--- a/install.py Sat Feb 16 15:08:51 2013 +0100 +++ b/install.py Sat Feb 16 16:00:16 2013 +0100 @@ -403,13 +403,9 @@ if os.path.exists("/Applications/" + macAppBundleName): shutil.rmtree("/Applications/" + macAppBundleName) - except IOError as msg: + except (IOError, OSError) as msg: sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) exit(7) - - except OSError as msg: - sys.stderr.write('OSError: {0}\nTry install with admin rights.\n'.format(msg)) - exit(7) def shutilCopy(src, dst, perm=0o644): @@ -522,13 +518,9 @@ # create the global plugins directory createGlobalPluginsDir() - except IOError as msg: + except (IOError, OSError) as msg: sys.stderr.write('IOError: {0}\nTry install with admin rights.\n'.format(msg)) return(7) - - except OSError as msg: - sys.stderr.write('OSError: {0}\nTry install with admin rights.\n'.format(msg)) - return(7) # copy some text files to the doc area for name in ["LICENSE.GPL3", "THANKS", "changelog"]: @@ -1094,8 +1086,9 @@ shutil.rmtree(distDir, True) else: cleanUp() - except IOError as msg: + except (IOError, OSError) as msg: sys.stderr.write('IOError: {0}\nTry install as root.\n'.format(msg)) + return(7) # Create a config file and delete the default one createConfig()