Kaydet (Commit) 4605a002 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Endly, fix UnboundLocalError in telnetlib

üst f06576dc
...@@ -17,9 +17,10 @@ def server(evt, serv): ...@@ -17,9 +17,10 @@ def server(evt, serv):
conn, addr = serv.accept() conn, addr = serv.accept()
except socket.timeout: except socket.timeout:
pass pass
else:
conn.close()
finally: finally:
serv.close() serv.close()
conn.close()
evt.set() evt.set()
class GeneralTests(TestCase): class GeneralTests(TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment