From 53ca6ae1f362da99b5913505a53904d22f460c63 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 11 Oct 2015 11:09:57 +0300 Subject: [PATCH] py/makeqstrdata.py: Catch and report case of empty input file. The usual cause would be that a cross-compiler for a port is not in PATH. --- py/makeqstrdata.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/makeqstrdata.py b/py/makeqstrdata.py index d30cf3ec4e..e8adb0cbb6 100644 --- a/py/makeqstrdata.py +++ b/py/makeqstrdata.py @@ -80,6 +80,10 @@ def do_work(infiles): # add the qstr to the list, with order number to retain original order in file qstrs[ident] = (len(qstrs), ident, qstr) + if not qcfgs: + sys.stderr.write("ERROR: Empty preprocessor output - check for errors above\n") + sys.exit(1) + # get config variables cfg_bytes_len = int(qcfgs['BYTES_IN_LEN']) cfg_bytes_hash = int(qcfgs['BYTES_IN_HASH'])