From 1ff01a43ffaf70a1766cb8d14bb1612a40f4cfae Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 5 Apr 2016 16:09:41 +0800 Subject: [PATCH] artiq_flash: clear error message when bin directory is absent --- artiq/frontend/artiq_flash.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/artiq/frontend/artiq_flash.py b/artiq/frontend/artiq_flash.py index 4de71744f..0d6e791ad 100755 --- a/artiq/frontend/artiq_flash.py +++ b/artiq/frontend/artiq_flash.py @@ -72,6 +72,9 @@ def main(): if opts.dir is None: opts.dir = os.path.join(artiq_dir, "binaries", "{}-{}".format(opts.target, opts.adapter)) + if not os.path.exists(opts.dir): + raise SystemExit("Binaries directory '{}' does not exist" + .format(opts.dir)) conv = False