use errno.EACCES as suggested by Brian Harring
authorAlec Warner <antarus@gentoo.org>
Sun, 28 Jan 2007 19:04:06 +0000 (19:04 -0000)
committerAlec Warner <antarus@gentoo.org>
Sun, 28 Jan 2007 19:04:06 +0000 (19:04 -0000)
svn path=/main/trunk/; revision=5814

bin/env-update

index b919a12673c03f74fc502fc17508bc175a0a3381..69daaca878643cfbb8c2e48805e0dc55dbfd8f3f 100755 (executable)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-import os,sys
+import os, sys, errno
 
 def usage(status):
        print "Usage: env-update [--no-ldconfig]"
@@ -31,7 +31,7 @@ except ImportError:
 try:
        portage.env_update(makelinks)
 except IOError, e:
-       if e.errno == 13:
+       if e.errno == errno.EACCES:
                print "env-update: Need superuser access"
                sys.exit(1)
        else: