Replace subprocess.run(..., check=True) with subprocess.check_call().
authorwhitequark <whitequark@whitequark.org>
Sun, 7 Jul 2019 00:11:33 +0000 (00:11 +0000)
committerwhitequark <whitequark@whitequark.org>
Sat, 3 Aug 2019 16:20:16 +0000 (16:20 +0000)
nmigen_boards/blackice.py
nmigen_boards/blackice_ii.py
nmigen_boards/ice40_hx1k_blink_evn.py
nmigen_boards/ice40_hx8k_b_evn.py
nmigen_boards/icebreaker.py
nmigen_boards/icestick.py
nmigen_boards/kc705.py
nmigen_boards/tinyfpga_bx.py
nmigen_boards/versa_ecp5.py

index 399e29c102b7704a0833fe0671e1ec57f89d84b8..591f74d8008568ba874b6956ecd3a295cad4d9dc 100644 (file)
@@ -69,7 +69,7 @@ class BlackIcePlatform(LatticeICE40Platform):
 
     def toolchain_program(self, products, name):
         with products.extract("{}.bin".format(name)) as bitstream_filename:
-            subprocess.run(["cp", bitstream_filename, "/dev/ttyACM0"], check=True)
+            subprocess.check_call(["cp", bitstream_filename, "/dev/ttyACM0"])
 
 
 if __name__ == "__main__":
index 3107350129142a90de97ed3c2163c16c7772c62f..a9830bc3e3dff7beae93c6e5789101373c1ecaa0 100644 (file)
@@ -71,7 +71,7 @@ class BlackIceIIPlatform(LatticeICE40Platform):
 
     def toolchain_program(self, products, name):
         with products.extract("{}.bin".format(name)) as bitstream_filename:
-            subprocess.run(["cp", bitstream_filename, "/dev/ttyACM0"], check=True)
+            subprocess.check_call(["cp", bitstream_filename, "/dev/ttyACM0"])
 
 
 if __name__ == "__main__":
index ab280a2dd0270d74fdbf7a695927423674efb407..418c593efc08355414d2bbc6a912229ca12d9039 100644 (file)
@@ -42,7 +42,7 @@ class ICE40HX1KBlinkEVNPlatform(LatticeICE40Platform):
     def toolchain_program(self, products, name):
         iceburn = os.environ.get("ICEBURN", "iCEburn")
         with products.extract("{}.bin".format(name)) as bitstream_filename:
-            subprocess.run([iceburn, "-evw", bitstream_filename], check=True)
+            subprocess.check_call([iceburn, "-evw", bitstream_filename])
 
 
 if __name__ == "__main__":
index 1f6d6d15a5a528633d058c16f6602ba7b847437f..4ff8d85ecf30378fe70efb716279a7eafa051395 100644 (file)
@@ -62,7 +62,7 @@ class ICE40HX8KBEVNPlatform(LatticeICE40Platform):
         iceprog = os.environ.get("ICEPROG", "iceprog")
         with products.extract("{}.bin".format(name)) as bitstream_filename:
             # TODO: this should be factored out and made customizable
-            subprocess.run([iceprog, "-S", bitstream_filename], check=True)
+            subprocess.check_call([iceprog, "-S", bitstream_filename])
 
 
 if __name__ == "__main__":
index 5032346747e21c8e40f28190e903338aedfb5d1d..39d82d5cde32b36b8684d4f8e003093a9a0eb902 100644 (file)
@@ -78,7 +78,7 @@ class ICEBreakerPlatform(LatticeICE40Platform):
     def toolchain_program(self, products, name):
         iceprog = os.environ.get("ICEPROG", "iceprog")
         with products.extract("{}.bin".format(name)) as bitstream_filename:
-            subprocess.run([iceprog, bitstream_filename], check=True)
+            subprocess.check_call([iceprog, bitstream_filename])
 
 
 if __name__ == "__main__":
index 217e411e5dfb319665488451d4575189783aa7ba..e575aacff42f6f561a859574c67c9ee69afe3da7 100644 (file)
@@ -48,7 +48,7 @@ class ICEStickPlatform(LatticeICE40Platform):
     def toolchain_program(self, products, name):
         iceprog = os.environ.get("ICEPROG", "iceprog")
         with products.extract("{}.bin".format(name)) as bitstream_filename:
-            subprocess.run([iceprog, bitstream_filename], check=True)
+            subprocess.check_call([iceprog, bitstream_filename])
 
 
 if __name__ == "__main__":
index df3a492dc9658b61e2fbb96006220b0d403ace7a..22ba5fccbadfa5cfad15decfcc7b2ae9266ad235 100644 (file)
@@ -36,8 +36,10 @@ class KC705Platform(Xilinx7SeriesPlatform):
     def toolchain_program(self, products, name):
         openocd = os.environ.get("OPENOCD", "openocd")
         with products.extract("{}.bit".format(name)) as bitstream_filename:
-            subprocess.run([openocd, "-c",
-                            "source [find board/kc705.cfg]; init; pld load 0 {}; exit".format(bitstream_filename)], check=True)
+            subprocess.check_call([openocd,
+                "-c", "source [find board/kc705.cfg]; init; pld load 0 {}; exit"
+                      .format(bitstream_filename)
+            ])
 
 
 if __name__ == "__main__":
index 5dcd7aa59302498957be334b845ad24e99f0b546..5db90cf55fa5abbc89cc911e75ec1935b4da7d5b 100644 (file)
@@ -45,7 +45,7 @@ class TinyFPGABXPlatform(LatticeICE40Platform):
     def toolchain_program(self, products, name):
         tinyprog = os.environ.get("TINYPROG", "tinyprog")
         with products.extract("{}.bin".format(name)) as bitstream_filename:
-            subprocess.run([tinyprog, "-p", bitstream_filename], check=True)
+            subprocess.check_call([tinyprog, "-p", bitstream_filename])
 
 
 if __name__ == "__main__":
index 262e3091f2a9dd500e22c98f4bfa208d3c3e0b1a..35b28be00e8312dc15dcb89cfe5d10fea2ad811b 100644 (file)
@@ -171,10 +171,10 @@ class VersaECP5Platform(LatticeECP5Platform):
         openocd = os.environ.get("OPENOCD", "openocd")
         with products.extract("{}-openocd.cfg".format(name), "{}.svf".format(name)) \
                 as (config_filename, vector_filename):
-            subprocess.run([openocd,
+            subprocess.check_call([openocd,
                 "-f", config_filename,
                 "-c", "transport select jtag; init; svf -quiet {}; exit".format(vector_filename)
-            ], check=True)
+            ])
 
 
 if __name__ == "__main__":