Kaydet (Commit) 270fe408 authored tarafından Victor Stinner's avatar Victor Stinner

test_tkinter: use a context manager to close directly the pipe

Patch written by Nadeem Vawda
üst 5c85e3f3
......@@ -31,7 +31,8 @@ class TkLoadTest(unittest.TestCase):
# doesn't actually carry through to the process level
# because they don't support unsetenv
# If that's the case, abort.
display = os.popen('echo $DISPLAY').read().strip()
with os.popen('echo $DISPLAY') as pipe:
display = pipe.read().strip()
if display:
return
......
......@@ -866,6 +866,7 @@ Andrew Vant
Atul Varma
Dmitry Vasiliev
Alexandre Vassalotti
Nadeem Vawda
Frank Vercruesse
Mike Verdone
Jaap Vermeulen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment