projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed294af
)
Bug #204020 - Make grabfile() properly raise PermissionDenied when
author
Zac Medico
<zmedico@gentoo.org>
Wed, 2 Jan 2008 15:02:23 +0000
(15:02 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Wed, 2 Jan 2008 15:02:23 +0000
(15:02 -0000)
appropriate instead of silently ignoring permission errors.
(trunk r9135)
svn path=/main/branches/2.1.2/; revision=9136
pym/portage_util.py
patch
|
blob
|
history
diff --git
a/pym/portage_util.py
b/pym/portage_util.py
index db93a042a37967f3dbdae53fabb318e6e3718bc8..486376bfceec0db25ccef8a945bb0e5a5c970ec1 100644
(file)
--- a/
pym/portage_util.py
+++ b/
pym/portage_util.py
@@
-266,7
+266,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