]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[cloud] Allow aws-import script to run on Python 3.6
authorMichael Brown <mcb30@ipxe.org>
Wed, 6 Apr 2022 13:36:07 +0000 (14:36 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 6 Apr 2022 13:36:07 +0000 (14:36 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
contrib/cloud/aws-import

index eef4302d521a17ecb753bd765f504ec19726faa0..b9a350f6398a1e80b0d7a0716cd2e43b1a201476 100755 (executable)
@@ -16,7 +16,7 @@ BLOCKSIZE = 512 * 1024
 def detect_architecture(image):
     """Detect CPU architecture"""
     mdir = subprocess.run(['mdir', '-b', '-i', image, '::/EFI/BOOT'],
-                          capture_output=True)
+                          stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     if any(b'BOOTAA64.EFI' in x for x in mdir.stdout.splitlines()):
         return 'arm64'
     return 'x86_64'