diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-09 06:06:27 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-09 06:06:27 +0000 |
commit | df43103d0dd5be8a96ff61476c97fa0209deb712 (patch) | |
tree | d10e81a8cf3dbec7a8fdf5138846d2fe9d21b4b0 | |
parent | 5a34eae5bf00b3289e5ce7c004e772fc51f5376b (diff) | |
download | portage-df43103d0dd5be8a96ff61476c97fa0209deb712.tar.gz portage-df43103d0dd5be8a96ff61476c97fa0209deb712.tar.bz2 portage-df43103d0dd5be8a96ff61476c97fa0209deb712.zip |
Remove a redundant os.access() call in portdbapi.aux_get()
and handle the potential OSError instead.
svn path=/main/trunk/; revision=8009
-rw-r--r-- | pym/portage/dbapi/porttree.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 6ef737f8f..d47f6fd9d 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -272,14 +272,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] |