From 4f589a72777ca1c151bad1807de1edf5f33f07c0 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 b29128a35..8c0090187 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