From: Alec Warner Date: Sun, 28 Jan 2007 19:04:06 +0000 (-0000) Subject: use errno.EACCES as suggested by Brian Harring X-Git-Tag: v2.2_pre1~1790 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa0bea1c31100ace6153bf082f1aade4c2d94d79;p=portage.git use errno.EACCES as suggested by Brian Harring svn path=/main/trunk/; revision=5814 --- diff --git a/bin/env-update b/bin/env-update index b919a1267..69daaca87 100755 --- a/bin/env-update +++ b/bin/env-update @@ -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: