forked from M-Labs/artiq
1
0
Fork 0

artiq_flash: fix a refactoring mistake.

This commit is contained in:
whitequark 2018-01-20 08:00:13 +00:00
parent c3323f0d57
commit 8598e475e9
1 changed files with 2 additions and 2 deletions

View File

@ -298,8 +298,8 @@ def main():
if not os.access(gateware_bin, os.R_OK): if not os.access(gateware_bin, os.R_OK):
bin_handle, gateware_bin = tempfile.mkstemp() bin_handle, gateware_bin = tempfile.mkstemp()
gateware_bit = artifact_path("gateware", "top.bit") gateware_bit = artifact_path("gateware", "top.bit")
with open(gateware_bit, "rb") as bit_handle: with open(gateware_bit, "rb") as bit_file, open(bin_handle, "wb") as bin_file:
bit2bin(bit_handle, bin_handle) bit2bin(bit_file, bin_file)
atexit.register(lambda: os.unlink(gateware_bin)) atexit.register(lambda: os.unlink(gateware_bin))
programmer.flash_binary(*config["gateware"], gateware_bin) programmer.flash_binary(*config["gateware"], gateware_bin)