From 4605a00207d26fe065896ad9cd047bbda5e4a9b2 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 1 Mar 2011 00:41:10 +0000 Subject: Endly, fix UnboundLocalError in telnetlib --- Lib/test/test_telnetlib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- cgit v0.12