projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9fea52
)
Wrap possible exceptions raised by stat call in apply_secpass_permissions.
author
Zac Medico
<zmedico@gentoo.org>
Tue, 14 Mar 2006 00:47:15 +0000
(
00:47
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Tue, 14 Mar 2006 00:47:15 +0000
(
00:47
-0000)
svn path=/main/trunk/; revision=2872
pym/portage_util.py
patch
|
blob
|
history
diff --git
a/pym/portage_util.py
b/pym/portage_util.py
index 205db9b36cca6426bf33f497076d44bafc62581e..7ffe381c4d8a9a79183fd746d881581b0c88cdc3 100644
(file)
--- a/
pym/portage_util.py
+++ b/
pym/portage_util.py
@@
-494,7
+494,15
@@
def apply_secpass_permissions(filename, uid=-1, gid=-1, mode=0,
unapplied."""
if stat_cached is None:
- stat_cached = os.stat(filename)
+ try:
+ stat_cached = os.stat(filename)
+ except OSError, oe:
+ if oe.errno == errno.EPERM:
+ raise OperationNotPermitted(oe)
+ elif oe.errno == errno.ENOENT:
+ raise FileNotFound(oe)
+ else:
+ raise oe
all_applied = True