projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
295d6ca
)
Catch an exception instead of using a redundant os.access call.
author
Zac Medico
<zmedico@gentoo.org>
Thu, 7 Dec 2006 22:29:13 +0000
(22:29 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 7 Dec 2006 22:29:13 +0000
(22:29 -0000)
svn path=/main/trunk/; revision=5209
pym/portage.py
patch
|
blob
|
history
diff --git
a/pym/portage.py
b/pym/portage.py
index 13c851ab0e1f95c18fa111ee586861f6f55a1b04..e51934b765500fd80b9d491552d7f8d59f5d222b 100644
(file)
--- a/
pym/portage.py
+++ b/
pym/portage.py
@@
-4795,14
+4795,14
@@
class vardbapi(dbapi):
results = []
for x in wants:
myfn = self.root+VDB_PATH+"/"+str(mycpv)+"/"+str(x)
-
if os.access(myfn,os.R_OK)
:
+
try
:
myf = open(myfn, "r")
myd = myf.read()
myf.close()
myd = re.sub("[\n\r\t]+"," ",myd)
myd = re.sub(" +"," ",myd)
myd = string.strip(myd)
- e
lse
:
+ e
xcept (IOError, OSError)
:
myd = ""
results.append(myd)
if "EAPI" in wants: