# snag mtime since we use it later, and to trigger stat failure
# if it doesn't exist
ebuild_hash.mtime
- except OSError:
+ except FileNotFound:
writemsg(_("!!! aux_get(): ebuild for " \
"'%s' does not exist at:\n") % (cpv,), noiselevel=-1)
writemsg("!!! %s\n" % ebuild_path, noiselevel=-1)
import operator
from portage.util import normalize_path
import errno
-from portage.exception import PermissionDenied
+from portage.exception import FileNotFound, PermissionDenied
from portage import os
from portage import checksum
# the straight c api.
# thus use the defacto python compatibility work around;
# access via index, which guarantees you get the raw long.
- self.mtime = obj = os.stat(self.location)[stat.ST_MTIME]
+ try:
+ self.mtime = obj = os.stat(self.location)[stat.ST_MTIME]
+ except OSError as e:
+ if e.errno in (errno.ENOENT, errno.ESTALE):
+ raise FileNotFound(self.location)
+ raise
return obj
if not attr.islower():
# we don't care to allow .mD5 as an alias for .md5
obj.eclass_dir = x
try:
mtime = obj.mtime
- except OSError:
+ except FileNotFound:
continue
ys=y[:-eclass_len]
if x == self._master_eclass_root: