From: Matthew Fernandez <matthew.fernandez@gmail.com>
Date: Sat, 24 Oct 2020 19:41:39 +0000 (-0700)
Subject: unfuse another with block in rtest
X-Git-Tag: 2.46.0~20^2^2~3^2~3
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef33add8fd29efb3138725a7d1f7a3a4701f0690;p=graphviz

unfuse another with block in rtest
---

diff --git a/rtest/rtest.py b/rtest/rtest.py
index 5027d4eeb..72c962efa 100755
--- a/rtest/rtest.py
+++ b/rtest/rtest.py
@@ -120,15 +120,15 @@ def doDiff(OUTFILE, OUTDIR, REFDIR, testname, subtest_index, fmt):
       stdout=subprocess.DEVNULL,
     )
   elif F == 'svg':
-    with open(TMPFILE1, mode='w') as fd1, \
-         open(TMPFILE2, mode='w') as fd2:
+    with open(TMPFILE1, mode='w') as fd:
       subprocess.check_call(
         ['sed', '/^<!--/d;/-->$/d', FILE1],
-        stdout=fd1,
+        stdout=fd,
       )
+    with open(TMPFILE2, mode='w') as fd:
       subprocess.check_call(
         ['sed', '/^<!--/d;/-->$/d', FILE2],
-        stdout=fd2,
+        stdout=fd,
       )
     returncode = subprocess.call(
       ['diff', '-q', '--strip-trailing-cr', TMPFILE1, TMPFILE2],