@@ -177,6 +177,7 @@ class MsgQ:
# (note this is a catch-all, but we reraise it)
if os.path.exists(self.socket_file):
os.remove(self.socket_file)
+ self.listen_socket.close()
raise e
if self.poller:
@@ -111,7 +111,6 @@ class TestSubscriptionManager(unittest.TestCase):
def test_open_socket_bad(self):
msgq = MsgQ("/does/not/exist")
self.assertRaises(socket.error, msgq.setup)
- msgq.listen_socket.close()
class SendNonblock(unittest.TestCase):
"""