* [PATCH] sstatesig: Add try/except around the stat calls
@ 2014-06-18 16:58 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-06-18 16:58 UTC (permalink / raw)
To: openembedded-core
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index acff2a0..d58147f 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-18 16:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 16:58 [PATCH] sstatesig: Add try/except around the stat calls Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.