From b81b40d553cbb4209dd95b9f0f1357ec30c16132 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 b43ee473b..18d3e2418 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"),