diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 19:27:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 19:27:46 +0100 |
commit | 72875493b8bbb5d6793380ee71c6bca4f438ca04 (patch) | |
tree | 59fe6088160dc5bb2be365218cd820ceb2cf9787 /bitbake/lib/bb | |
parent | e72210c791fa2565b7922bdc6542fc064203930b (diff) | |
download | poky-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/bb')
-rw-r--r-- | bitbake/lib/bb/codeparser.py | 7 |
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]: |