diff options
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 5d8a253a1f..9b2f658a46 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -363,10 +363,12 @@ def clean_basepaths_list(a): | |||
363 | def compare_sigfiles(a, b, recursecb = None): | 363 | def compare_sigfiles(a, b, recursecb = None): |
364 | output = [] | 364 | output = [] |
365 | 365 | ||
366 | p1 = pickle.Unpickler(open(a, "rb")) | 366 | with open(a, 'rb') as f: |
367 | a_data = p1.load() | 367 | p1 = pickle.Unpickler(ff) |
368 | p2 = pickle.Unpickler(open(b, "rb")) | 368 | a_data = p1.load() |
369 | b_data = p2.load() | 369 | with open(b, 'rb') as f: |
370 | p2 = pickle.Unpickler(f) | ||
371 | b_data = p2.load() | ||
370 | 372 | ||
371 | def dict_diff(a, b, whitelist=set()): | 373 | def dict_diff(a, b, whitelist=set()): |
372 | sa = set(a.keys()) | 374 | sa = set(a.keys()) |
@@ -563,8 +565,9 @@ def calc_taskhash(sigdata): | |||
563 | def dump_sigfile(a): | 565 | def dump_sigfile(a): |
564 | output = [] | 566 | output = [] |
565 | 567 | ||
566 | p1 = pickle.Unpickler(open(a, "rb")) | 568 | with open(a, 'rb') as f: |
567 | a_data = p1.load() | 569 | p1 = pickle.Unpickler(f) |
570 | a_data = p1.load() | ||
568 | 571 | ||
569 | output.append("basewhitelist: %s" % (a_data['basewhitelist'])) | 572 | output.append("basewhitelist: %s" % (a_data['basewhitelist'])) |
570 | 573 | ||