Fixed an issue in the install script. 5_3_x

Sat, 16 Feb 2013 16:30:26 +0100

author
"Detlev Offenbach <detlev@die-offenbachs.de>"
date
Sat, 16 Feb 2013 16:30:26 +0100
branch
5_3_x
changeset 2422
21509a6de6e0
parent 2419
ae6f93678a6e
child 2429
a68c882ad6cc

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()

eric ide

mercurial