From 6d30dcee896fd464a2c880a3372706226eedba6a Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Fri, 3 Mar 2017 14:11:14 -0800 Subject: [PATCH] Print an error message when the OpenOCD config file can't be read --- debug/testlib.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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") -- 2.30.2