summaryrefslogtreecommitdiffstats
path: root/bin/portageq
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-20 00:01:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-20 00:01:49 +0000
commit13ecf921b8e21c1ce98c6da8a5852ba13acfb280 (patch)
treef0d1666f8f386127bb745ecab6c497806fa5d460 /bin/portageq
parentf1b6fede42435d2c53db5af3d10cdbc1f2853fb1 (diff)
downloadportage-13ecf921b8e21c1ce98c6da8a5852ba13acfb280.tar.gz
portage-13ecf921b8e21c1ce98c6da8a5852ba13acfb280.tar.bz2
portage-13ecf921b8e21c1ce98c6da8a5852ba13acfb280.zip
For bug #180165, make portageq print a "Permission denied" error when appropriate. A PermissionDenied exception is raised from portage.listdir() enven when EmptyOnError is True since errno.EACCES is very likely to indicate a condition that should be reported in any case.
svn path=/main/trunk/; revision=6881
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/portageq b/bin/portageq
index 968cc129a..b9260fed5 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -383,6 +383,9 @@ def main():
except KeyError:
usage(sys.argv)
sys.exit(os.EX_USAGE)
+ except portage.exception.PermissionDenied, e:
+ sys.stderr.write("Permission denied: '%s'\n" % str(e))
+ sys.exit(e.errno)
main()