diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-01-02 15:00:39 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-01-02 15:00:39 +0000 |
commit | 8701c75d464eaca97a5f1d9b5a901e62adec37f6 (patch) | |
tree | 121c367f8e3c45b556fec7c2c5afbc089619f696 | |
parent | 613a06dfb343e5b5983947435e4dd7918fd0ef13 (diff) | |
download | portage-8701c75d464eaca97a5f1d9b5a901e62adec37f6.tar.gz portage-8701c75d464eaca97a5f1d9b5a901e62adec37f6.tar.bz2 portage-8701c75d464eaca97a5f1d9b5a901e62adec37f6.zip |
Bug #204020 - Make grabfile() properly raise PermissionDenied when
appropriate instead of silently ignoring permission errors.
svn path=/main/trunk/; revision=9135
-rw-r--r-- | pym/portage/util.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py index 83d3fb430..39abcd81e 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -280,7 +280,9 @@ def grablines(myfilename,recursive=0): myfile = open(myfilename, "r") mylines = myfile.readlines() myfile.close() - except IOError: + except IOError, e: + if e.errno == PermissionDenied.errno: + raise PermissionDenied(myfilename) pass return mylines |