summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-15 04:50:11 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-15 04:50:11 +0000
commit076a38005c19efaad184048a21d084428ebcd63f (patch)
treecf7ce8228d87eb4622f356c3d9261a898578ed25
parent819592454153657a953caed7cc380ebc031f49cc (diff)
downloadportage-076a38005c19efaad184048a21d084428ebcd63f.tar.gz
portage-076a38005c19efaad184048a21d084428ebcd63f.tar.bz2
portage-076a38005c19efaad184048a21d084428ebcd63f.zip
Bug #236683 - Fix PermissionDenied handling to report the exception type.
svn path=/main/trunk/; revision=11922
-rwxr-xr-xbin/ebuild5
-rw-r--r--pym/portage/__init__.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/ebuild b/bin/ebuild
index 6760787c4..b4ec87014 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -202,7 +202,7 @@ def stale_env_warning():
for x in msg:
portage.writemsg(">>> %s\n" % x)
-from portage.exception import UnsupportedAPIException
+from portage.exception import PermissionDenied, UnsupportedAPIException
checked_for_stale_env = False
for arg in pargs:
@@ -230,6 +230,9 @@ for arg in pargs:
for x in msg:
portage.writemsg("!!! %s\n" % x, noiselevel=-1)
a = 1
+ except PermissionDenied, e:
+ portage.writemsg("!!! Permission Denied: %s\n" % (e,), noiselevel=-1)
+ a = 1
if a == None:
print "Could not run the required binary?"
a = 127
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 8dcd8a0c8..8f7defff8 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -5696,7 +5696,7 @@ def doebuild(myebuild, mydo, myroot, mysettings, debug=0, listonly=0,
elif "digest" in mysettings.features:
digestgen(aalist, mysettings, overwrite=0, myportdb=mydbapi)
except portage.exception.PermissionDenied, e:
- writemsg("!!! %s\n" % str(e), noiselevel=-1)
+ writemsg("!!! Permission Denied: %s\n" % (e,), noiselevel=-1)
if mydo in ("digest", "manifest"):
return 1