From: Palmer Dabbelt Date: Fri, 3 Mar 2017 22:11:14 +0000 (-0800) Subject: Print an error message when the OpenOCD config file can't be read X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d30dcee896fd464a2c880a3372706226eedba6a;p=riscv-tests.git Print an error message when the OpenOCD config file can't be read --- diff --git a/debug/testlib.py b/debug/testlib.py index 03ee0b4..3927722 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -163,7 +163,12 @@ class Openocd(object): ] if config: - cmd += ["-f", find_file(config)] + f = find_file(config) + if f is None: + print("Unable to read file " + config) + exit(1) + + cmd += ["-f", f] if debug: cmd.append("-d")