summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-21 17:14:19 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-21 17:14:19 (GMT)
commit3bce11cbbdfa1ea498b8fcaddce5c1adb3a2e32f (patch)
treeeab694dac3b5c354c62c29944db4d327e85d4444 /Lib
parent719a449ba6ee2390758efa0751bbb1277bd61174 (diff)
downloadcpython-3bce11cbbdfa1ea498b8fcaddce5c1adb3a2e32f.zip
cpython-3bce11cbbdfa1ea498b8fcaddce5c1adb3a2e32f.tar.gz
cpython-3bce11cbbdfa1ea498b8fcaddce5c1adb3a2e32f.tar.bz2
Make test_nntplib more robust
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_nntplib.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
index 13bb505..a387f61 100644
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -227,8 +227,10 @@ class NetworkedNNTPTestsMixin:
def test_zzquit(self):
# This test must be called last, hence the name
cls = type(self)
- self.server.quit()
- cls.server = None
+ try:
+ self.server.quit()
+ finally:
+ cls.server = None
@classmethod
def wrap_methods(cls):