8000 gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission … · adorilson/cpython@b689d13 · GitHub
[go: up one dir, main page]

Skip to content

Commit b689d13

Browse files
encukouadorilson
authored andcommitted
pythongh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (pythonGH-116105)
pythongh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error
1 parent 7efb06c commit b689d13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/libregrtest/win_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ class WindowsLoadTracker():
2424
"""
2525

2626
def __init__(self):
27+
# make __del__ not fail if pre-flight test fails
28+
self._running = None
29+
self._stopped = None
30+
2731
# Pre-flight test for access to the performance data;
2832
# `PermissionError` will be raised if not allowed
2933
winreg.QueryInfoKey(winreg.HKEY_PERFORMANCE_DATA)

0 commit comments

Comments
 (0)
0