From 5dc131636d84a36eb9e5597ab0cc531d66643eb8 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 9 Nov 2017 18:10:15 +0100 Subject: [PATCH] artiq_flash: adapt to bit2bin --- artiq/frontend/artiq_flash.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_flash.py b/artiq/frontend/artiq_flash.py index 4924a8107..ad94ae7ee 100755 --- a/artiq/frontend/artiq_flash.py +++ b/artiq/frontend/artiq_flash.py @@ -254,7 +254,8 @@ def main(): raise ValueError("invalid action", action) if conv: - bit2bin(bit, bin_handle) + with open(bit, "rb") as f, open(bin_handle, "wb") as g: + bit2bin(f, g) try: programmer.do() finally: