diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 1becaa4f02..67ec71f866 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py @@ -71,7 +71,12 @@ def cached_mtime_noerror(f): return __mtime_cache[f] def update_mtime(f): - __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] + try: + __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] + except OSError: + if f in __mtime_cache: + del __mtime_cache[f] + return 0 return __mtime_cache[f] def update_cache(f):