bitbake/codeparser: Correctly handle a missing/empty cache file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
e72210c791
commit
72875493b8
|
@ -72,8 +72,11 @@ def parser_cache_save(d):
|
|||
|
||||
lf = bb.utils.lockfile(cachefile + ".lock")
|
||||
|
||||
p = pickle.Unpickler(file(cachefile, "rb"))
|
||||
data, version = p.load()
|
||||
try:
|
||||
p = pickle.Unpickler(file(cachefile, "rb"))
|
||||
data, version = p.load()
|
||||
except IOError:
|
||||
data, version = None, None
|
||||
|
||||
if version == PARSERCACHE_VERSION:
|
||||
for h in data[0]:
|
||||
|
|
Loading…
Reference in New Issue