summaryrefslogtreecommitdiff
path: root/Lib/test/libregrtest/win_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/libregrtest/win_utils.py')
-rw-r--r--Lib/test/libregrtest/win_utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/win_utils.py b/Lib/test/libregrtest/win_utils.py
index ca27f3681f..adfe278ba3 100644
--- a/Lib/test/libregrtest/win_utils.py
+++ b/Lib/test/libregrtest/win_utils.py
@@ -60,9 +60,15 @@ class WindowsLoadTracker():
# Close our copy of the write end of the pipe
os.close(command_stdout)
- def __del__(self):
+ def close(self):
+ if self.p is None:
+ return
self.p.kill()
self.p.wait()
+ self.p = None
+
+ def __del__(self):
+ self.close()
def read_output(self):
import _winapi