summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_threading.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index d031607..c6a5cf4 100644
--- a/Lib/test/test_threading.py
+++ b/Lib/test/test_threading.py
@@ -329,7 +329,10 @@ class ThreadTests(unittest.TestCase):
t = threading.Thread()
with catch_warning() as w:
- del threading.__warningregistry__
+ try:
+ del threading.__warningregistry__
+ except AttributeError:
+ pass
msg = "isDaemon() is deprecated in favor of the " \
"Thread.daemon property"
check(t.isDaemon(), w, msg)