projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
613a06d
)
Bug #204020 - Make grabfile() properly raise PermissionDenied when
author
Zac Medico
<zmedico@gentoo.org>
Wed, 2 Jan 2008 15:00:39 +0000
(15:00 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Wed, 2 Jan 2008 15:00:39 +0000
(15:00 -0000)
appropriate instead of silently ignoring permission errors.
svn path=/main/trunk/; revision=9135
pym/portage/util.py
patch
|
blob
|
history
diff --git
a/pym/portage/util.py
b/pym/portage/util.py
index 83d3fb430f7777201ee7009d70faf0f24010b123..39abcd81ec0226ab957ea2ca57903cd17bf18c00 100644
(file)
--- 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