From dbde7cf184fc34eeb82a905ce755b645a84f3285 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 24 May 2016 12:29:51 +0200 Subject: [PATCH] Fix testsuite failure when sockets is not defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit this fixes the UnboundLocalError issue "UnboundLocalError: local variable 'sockets' referenced before assignment" Thanks Ondřej Nový for the help --- tornado/test/netutil_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py index 70d969499..2f4207a3e 100644 --- a/tornado/test/netutil_test.py +++ b/tornado/test/netutil_test.py @@ -204,6 +204,7 @@ class TestPortAllocation(unittest.TestCase): @unittest.skipIf(not hasattr(socket, "SO_REUSEPORT"), "SO_REUSEPORT is not supported") def test_reuse_port(self): + sockets = [] socket, port = bind_unused_port(reuse_port=True) try: sockets = bind_sockets(port, 'localhost', reuse_port=True) -- 2.47.2