From 18878ba050c462e0f2d1e0ae0d6ea0b03ae1db0a Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Mon, 16 May 2016 22:02:11 +0200 Subject: [PATCH] flash: use the handle --- artiq/frontend/artiq_flash.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/artiq/frontend/artiq_flash.py b/artiq/frontend/artiq_flash.py index 3f9207d72..58146287d 100755 --- a/artiq/frontend/artiq_flash.py +++ b/artiq/frontend/artiq_flash.py @@ -98,7 +98,6 @@ def main(): bin = os.path.join(opts.dir, "top.bin") if not os.access(bin, os.R_OK): bin_handle, bin = tempfile.mkstemp() - bin_handle.close() bit = os.path.join(opts.dir, "top.bit") conv = True prog.append("jtagspi_program {} 0x{:x}".format( @@ -122,7 +121,7 @@ def main(): prog.append("exit") try: if conv: - bit2bin(bit, bin) + bit2bin(bit, bin_handle) subprocess.check_call([ "openocd", "-f", os.path.join("board", opts.target + ".cfg"),