Sat, 16 Feb 2013 16:30:26 +0100
Fixed an issue in the install script.
install.py | file | annotate | diff | comparison | revisions |
--- a/install.py Sat Feb 16 15:09:18 2013 +0100 +++ b/install.py Sat Feb 16 16:30:26 2013 +0100 @@ -403,12 +403,8 @@ if os.path.exists("/Applications/" + macAppBundleName): shutil.rmtree("/Applications/" + macAppBundleName) - except IOError 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)) + except (IOError, OSError) as msg: + sys.stderr.write('Error: {0}\nTry install with admin rights.\n'.format(msg)) exit(7) @@ -522,12 +518,8 @@ # create the global plugins directory createGlobalPluginsDir() - except IOError 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)) + except (IOError, OSError) as msg: + sys.stderr.write('Error: {0}\nTry install with admin rights.\n'.format(msg)) return(7) # copy some text files to the doc area @@ -1102,8 +1094,9 @@ shutil.rmtree(distDir, True) else: cleanUp() - except IOError as msg: - sys.stderr.write('IOError: {0}\nTry install as root.\n'.format(msg)) + except (IOError, OSError) as msg: + sys.stderr.write('Error: {0}\nTry install as root.\n'.format(msg)) + exit(7) # Create a config file and delete the default one createConfig()