summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-10-12 06:23:04 +0000
committerZac Medico <zmedico@gentoo.org>2007-10-12 06:23:04 +0000
commitbb25cfe36aac02c109f9ce1b4f26979d389b594a (patch)
treeda998df497d347437f1cbd4fc548df46dd27d1e6 /pym
parentc1051a2d9ce9b37aedd7bfa1be4e9629fae0a55d (diff)
downloadportage-bb25cfe36aac02c109f9ce1b4f26979d389b594a.tar.gz
portage-bb25cfe36aac02c109f9ce1b4f26979d389b594a.tar.bz2
portage-bb25cfe36aac02c109f9ce1b4f26979d389b594a.zip
Remove a redundant os.access() call in portdbapi.aux_get()
and handle the potential OSError instead. (trunk r8009) svn path=/main/branches/2.1.2/; revision=8067
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 8afd051ca..3edc5296a 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6253,14 +6253,14 @@ class portdbapi(dbapi):
noiselevel=-1)
- if os.access(myebuild, os.R_OK):
+ try:
emtime=os.stat(myebuild)[stat.ST_MTIME]
- else:
+ except OSError:
writemsg("!!! aux_get(): ebuild for '%(cpv)s' does not exist at:\n" % {"cpv":mycpv},
noiselevel=-1)
writemsg("!!! %s\n" % myebuild,
noiselevel=-1)
- raise KeyError
+ raise KeyError(mycpv)
try:
mydata = self.auxdb[mylocation][mycpv]