1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-07 16:59:22 +00:00

sstatesig: Add try/except around the stat calls

Its possible sstate symlinks to other sstate mirrors which then my get
removed/cleaned. If we find invalid symlinks, skip over them rather
than error with a backtrace.

(From OE-Core rev: 5ed9bb42abf93aa084dd23ca68cc996a94a51a10)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2014-06-18 17:58:56 +01:00
parent 2fcaad20e9
commit 3df8773ed9
+8 -2
View File
@@ -125,7 +125,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
foundall = True
break
else:
filedates[fullpath] = os.stat(fullpath).st_mtime
try:
filedates[fullpath] = os.stat(fullpath).st_mtime
except OSError:
continue
if not taskhashlist or (len(filedates) < 2 and not foundall):
# That didn't work, look in sstate-cache
@@ -156,7 +159,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
if taskhashlist:
hashfiles[hashval] = fullpath
else:
filedates[fullpath] = os.stat(fullpath).st_mtime
try:
filedates[fullpath] = os.stat(fullpath).st_mtime
except:
continue
if taskhashlist:
return hashfiles