diff options
Diffstat (limited to 'bitbake/lib/bb/siggen.py')
-rw-r--r-- | bitbake/lib/bb/siggen.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py index 5a584cadf9..58854aee76 100644 --- a/bitbake/lib/bb/siggen.py +++ b/bitbake/lib/bb/siggen.py | |||
@@ -849,10 +849,18 @@ def compare_sigfiles(a, b, recursecb=None, color=False, collapsed=False): | |||
849 | formatparams.update(values) | 849 | formatparams.update(values) |
850 | return formatstr.format(**formatparams) | 850 | return formatstr.format(**formatparams) |
851 | 851 | ||
852 | with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f: | 852 | try: |
853 | a_data = json.load(f, object_hook=SetDecoder) | 853 | with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f: |
854 | with bb.compress.zstd.open(b, "rt", encoding="utf-8", num_threads=1) as f: | 854 | a_data = json.load(f, object_hook=SetDecoder) |
855 | b_data = json.load(f, object_hook=SetDecoder) | 855 | except (TypeError, OSError) as err: |
856 | bb.error("Failed to open sigdata file '%s': %s" % (a, str(err))) | ||
857 | raise err | ||
858 | try: | ||
859 | with bb.compress.zstd.open(b, "rt", encoding="utf-8", num_threads=1) as f: | ||
860 | b_data = json.load(f, object_hook=SetDecoder) | ||
861 | except (TypeError, OSError) as err: | ||
862 | bb.error("Failed to open sigdata file '%s': %s" % (b, str(err))) | ||
863 | raise err | ||
856 | 864 | ||
857 | for data in [a_data, b_data]: | 865 | for data in [a_data, b_data]: |
858 | handle_renames(data) | 866 | handle_renames(data) |
@@ -1090,8 +1098,12 @@ def calc_taskhash(sigdata): | |||
1090 | def dump_sigfile(a): | 1098 | def dump_sigfile(a): |
1091 | output = [] | 1099 | output = [] |
1092 | 1100 | ||
1093 | with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f: | 1101 | try: |
1094 | a_data = json.load(f, object_hook=SetDecoder) | 1102 | with bb.compress.zstd.open(a, "rt", encoding="utf-8", num_threads=1) as f: |
1103 | a_data = json.load(f, object_hook=SetDecoder) | ||
1104 | except (TypeError, OSError) as err: | ||
1105 | bb.error("Failed to open sigdata file '%s': %s" % (a, str(err))) | ||
1106 | raise err | ||
1095 | 1107 | ||
1096 | handle_renames(a_data) | 1108 | handle_renames(a_data) |
1097 | 1109 | ||