summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 19:27:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 19:27:46 +0100
commit72875493b8bbb5d6793380ee71c6bca4f438ca04 (patch)
tree59fe6088160dc5bb2be365218cd820ceb2cf9787 /bitbake
parente72210c791fa2565b7922bdc6542fc064203930b (diff)
downloadpoky-72875493b8bbb5d6793380ee71c6bca4f438ca04.tar.gz
poky-72875493b8bbb5d6793380ee71c6bca4f438ca04.tar.bz2
poky-72875493b8bbb5d6793380ee71c6bca4f438ca04.zip
bitbake/codeparser: Correctly handle a missing/empty cache file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/codeparser.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index fdba06f678..f4482a46b8 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -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]: