From 143f7842912344f850a193db3134acee081d4c93 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 26 Jan 2017 21:52:59 +0100 Subject: [PATCH] artiq_flash: fix scripts_path --- artiq/frontend/artiq_flash.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/artiq/frontend/artiq_flash.py b/artiq/frontend/artiq_flash.py index a04d2ef06..3714ea58e 100755 --- a/artiq/frontend/artiq_flash.py +++ b/artiq/frontend/artiq_flash.py @@ -12,12 +12,13 @@ from artiq.frontend.bit2bin import bit2bin def scripts_path(): - scripts_path = ["share", "openocd", "scripts"] + p = ["share", "openocd", "scripts"] if os.name == "nt": - scripts_path.insert(0, "Library") - scripts_path = os.path.abspath(os.path.join( + p.insert(0, "Library") + p = os.path.abspath(os.path.join( os.path.dirname(shutil.which("openocd")), - "..", *scripts_path)) + "..", *p)) + return p def get_argparser():