summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
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/lib
parente72210c791fa2565b7922bdc6542fc064203930b (diff)
downloadpoky-72875493b8bbb5d6793380ee71c6bca4f438ca04.tar.gz
bitbake/codeparser: Correctly handle a missing/empty cache file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-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):
72 72
73 lf = bb.utils.lockfile(cachefile + ".lock") 73 lf = bb.utils.lockfile(cachefile + ".lock")
74 74
75 p = pickle.Unpickler(file(cachefile, "rb")) 75 try:
76 data, version = p.load() 76 p = pickle.Unpickler(file(cachefile, "rb"))
77 data, version = p.load()
78 except IOError:
79 data, version = None, None
77 80
78 if version == PARSERCACHE_VERSION: 81 if version == PARSERCACHE_VERSION:
79 for h in data[0]: 82 for h in data[0]: