[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/26] tests/functional: remove pointless with statement
From: |
Thomas Huth |
Subject: |
[PULL 26/26] tests/functional: remove pointless with statement |
Date: |
Wed, 11 Dec 2024 10:00:10 +0100 |
From: Daniel P. Berrangé <berrange@redhat.com>
The xorriso command directly writes to 'filename', so the surrounding
'with' statement is pointless.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20241129173120.761728-5-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/functional/test_ppc64_hv.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/functional/test_ppc64_hv.py
b/tests/functional/test_ppc64_hv.py
index 312248bbfe..d97b62e364 100755
--- a/tests/functional/test_ppc64_hv.py
+++ b/tests/functional/test_ppc64_hv.py
@@ -72,10 +72,9 @@ def extract_from_iso(self, iso, path):
cwd = os.getcwd()
os.chdir(self.workdir)
- with open(filename, "w") as outfile:
- cmd = "xorriso -osirrox on -indev %s -cpx %s %s" % (iso, path,
filename)
- subprocess.run(cmd.split(),
- stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
+ cmd = "xorriso -osirrox on -indev %s -cpx %s %s" % (iso, path,
filename)
+ subprocess.run(cmd.split(),
+ stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
os.chmod(filename, 0o600)
os.chdir(cwd)
--
2.47.1
- [PULL 13/26] s390x/cpumodel: add Vector-Packed-Decimal-Enhancement facility 3, (continued)
- [PULL 13/26] s390x/cpumodel: add Vector-Packed-Decimal-Enhancement facility 3, Thomas Huth, 2024/12/11
- [PULL 16/26] s390x/cpumodel: correct PLO feature wording, Thomas Huth, 2024/12/11
- [PULL 18/26] s390x/cpumodel: gen17 model, Thomas Huth, 2024/12/11
- [PULL 06/26] s390x/cpumodel: add msa12 changes, Thomas Huth, 2024/12/11
- [PULL 07/26] s390x/cpumodel: add msa13 subfunctions, Thomas Huth, 2024/12/11
- [PULL 09/26] linux-headers: Update to Linux 6.13-rc1, Thomas Huth, 2024/12/11
- [PULL 19/26] tests/functional: Bump the timeout of the sh4_tuxrun test, Thomas Huth, 2024/12/11
- [PULL 22/26] tests/functional: Convert the emcraft_sf2 avocado test, Thomas Huth, 2024/12/11
- [PULL 24/26] tests/functional: Convert the cubieboard avocado tests, Thomas Huth, 2024/12/11
- [PULL 25/26] tests/functional: remove unused system imports, Thomas Huth, 2024/12/11
- [PULL 26/26] tests/functional: remove pointless with statement,
Thomas Huth <=
- [PULL 23/26] tests/functional: Convert the smdkc210 avocado test, Thomas Huth, 2024/12/11
- [PULL 11/26] s390x/cpumodel: add Vector Enhancements facility 3, Thomas Huth, 2024/12/11
- [PULL 14/26] s390x/cpumodel: add Ineffective-nonconstrained-transaction facility, Thomas Huth, 2024/12/11
- [PULL 20/26] MAINTAINERS: Cover the tests/functional/test_sh4eb_r2d.py file, Thomas Huth, 2024/12/11
- [PULL 15/26] s390x/cpumodel: Add Sequential-Instruction-Fetching facility, Thomas Huth, 2024/12/11
- [PULL 17/26] s390x/cpumodel: Add PLO-extension facility, Thomas Huth, 2024/12/11
- [PULL 21/26] tests/functional: Convert the xlnx_versal_virt avocado test, Thomas Huth, 2024/12/11
- Re: [PULL 00/26] First s390x and functional testing patches for v10.0, Stefan Hajnoczi, 2024/12/12