diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-02-29 14:43:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 14:43:05 (GMT) |
commit | 845123d64110011e166f272c878bd56c1405bfb0 (patch) | |
tree | c3d544699fffd72bf5ead551c4ebfeaad9c04b84 /Lib | |
parent | 6359141867595f84f9e803e1053ae51db3203c49 (diff) | |
download | cpython-845123d64110011e166f272c878bd56c1405bfb0.zip cpython-845123d64110011e166f272c878bd56c1405bfb0.tar.gz cpython-845123d64110011e166f272c878bd56c1405bfb0.tar.bz2 |
[3.12] gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105) (GH-116120)
gh-116103: Prevent error in WindowsLoadTracker.__del__ on permission error (GH-116105)
(cherry picked from commit 186fa9387669bcba6d3974a99c012c2b2c6fb4ce)
gh-116103: Prevent error in WindowsLoadTracker.__del__ if there was a permission error
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/libregrtest/win_utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/win_utils.py b/Lib/test/libregrtest/win_utils.py index 5736cdf..b51fde0 100644 --- a/Lib/test/libregrtest/win_utils.py +++ b/Lib/test/libregrtest/win_utils.py @@ -24,6 +24,10 @@ class WindowsLoadTracker(): """ def __init__(self): + # make __del__ not fail if pre-flight test fails + self._running = None + self._stopped = None + # Pre-flight test for access to the performance data; # `PermissionError` will be raised if not allowed winreg.QueryInfoKey(winreg.HKEY_PERFORMANCE_DATA) |