Commit 540637f4 authored by Luke Macken's avatar Luke Macken

More robust PyrasiteIPC.close method

parent 5f531227
......@@ -175,7 +175,7 @@ class PyrasiteIPC(object):
def close(self):
if self.sock:
self.sock.close()
if self.server_sock:
if getattr(self, 'server_sock', None):
self.server_sock.close()
def __repr__(self):
......
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