summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-19 14:32:56 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-19 14:32:56 (GMT)
commitec99568ce4e9379aff022a2d199c98bd4a3695c5 (patch)
treec940e4c3707c972f7dcc4784261070540e9118d4 /Lib/test/test_threading.py
parentfa1e21cf965aa4ef30dc9b35d381e8c8690c59f9 (diff)
downloadcpython-ec99568ce4e9379aff022a2d199c98bd4a3695c5.zip
cpython-ec99568ce4e9379aff022a2d199c98bd4a3695c5.tar.gz
cpython-ec99568ce4e9379aff022a2d199c98bd4a3695c5.tar.bz2
fix possible error
Diffstat (limited to 'Lib/test/test_threading.py')
-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)