diff --git a/py/genlast.py b/py/genlast.py index 0071c7b8497c..ad44745d973a 100644 --- a/py/genlast.py +++ b/py/genlast.py @@ -48,6 +48,7 @@ def preprocess(command, output_dir, fn): process_file(fn, output_dir, output) except Exception as e: print(e, file=sys.stderr) + raise def maybe_preprocess(command, output_dir, fn): @@ -72,6 +73,18 @@ def maybe_preprocess(command, output_dir, fn): # Mac and Windows use 'spawn'. Uncomment this during testing to catch spawn-specific problems on Linux. # multiprocessing.set_start_method("spawn") executor = ProcessPoolExecutor(max_workers=multiprocessing.cpu_count() + 1) - executor.map(maybe_preprocess, itertools.repeat(command), itertools.repeat(output_dir), check) - executor.map(preprocess, itertools.repeat(command), itertools.repeat(output_dir), always) + results = [] + try: + results.extend( + executor.map( + maybe_preprocess, itertools.repeat(command), itertools.repeat(output_dir), check + ) + ) + results.extend( + executor.map( + preprocess, itertools.repeat(command), itertools.repeat(output_dir), always + ) + ) + except subprocess.CalledProcessError: + raise SystemExit(1) executor.shutdown() diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 674df7579a71..fefda4600646 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -87,11 +87,13 @@ STATIC int put_utf8(char *buf, int u) { } uint16_t decompress_length(const compressed_string_t *compressed) { + #ifndef NO_QSTR #if (compress_max_length_bits <= 8) return 1 + (compressed->data >> (8 - compress_max_length_bits)); #else return 1 + ((compressed->data * 256 + compressed->tail[0]) >> (16 - compress_max_length_bits)); #endif + #endif } char *decompress(const compressed_string_t *compressed, char *decompressed) {