summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_telnetlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-03-01 00:41:10 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-03-01 00:41:10 (GMT)
commit4605a00207d26fe065896ad9cd047bbda5e4a9b2 (patch)
treed0aa2978a2ef0264a78e5c76bd02a6f0bfb8cef1 /Lib/test/test_telnetlib.py
parentf06576dc2b2cde783a0295bb06321d010b3156d9 (diff)
downloadcpython-4605a00207d26fe065896ad9cd047bbda5e4a9b2.zip
cpython-4605a00207d26fe065896ad9cd047bbda5e4a9b2.tar.gz
cpython-4605a00207d26fe065896ad9cd047bbda5e4a9b2.tar.bz2
Endly, fix UnboundLocalError in telnetlib
Diffstat (limited to 'Lib/test/test_telnetlib.py')
-rw-r--r--Lib/test/test_telnetlib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_telnetlib.py b/Lib/test/test_telnetlib.py
index 843daf1..a78b938 100644
--- a/Lib/test/test_telnetlib.py
+++ b/Lib/test/test_telnetlib.py
@@ -17,9 +17,10 @@ def server(evt, serv):
conn, addr = serv.accept()
except socket.timeout:
pass
+ else:
+ conn.close()
finally:
serv.close()
- conn.close()
evt.set()
class GeneralTests(TestCase):