From eda34952debb071d602ca9da9534fde00e76e2f0 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 24 Oct 2020 12:40:03 -0700 Subject: [PATCH] unfuse a with block in rtest --- rtest/rtest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtest/rtest.py b/rtest/rtest.py index c44cdc333..5027d4eeb 100755 --- a/rtest/rtest.py +++ b/rtest/rtest.py @@ -105,15 +105,15 @@ def doDiff(OUTFILE, OUTDIR, REFDIR, testname, subtest_index, fmt): FILE2 = os.path.join(REFDIR, OUTFILE) F = fmt.split(':')[0] if F in ['ps', 'ps2']: - with open(TMPFILE1, mode='w') as fd1, \ - open(TMPFILE2, mode='w') as fd2: + with open(TMPFILE1, mode='w') as fd: subprocess.check_call( ['awk', '-f', 'strps.awk', FILE1], - stdout=fd1, + stdout=fd, ) + with open(TMPFILE2, mode='w') as fd: subprocess.check_call( ['awk', '-f', 'strps.awk', FILE2], - stdout=fd2, + stdout=fd, ) returncode = subprocess.call( ['diff', '-q', TMPFILE1, TMPFILE2], -- 2.40.0