MnccSocketServer: Don't unlink if the socket doesn't exist

Change-Id: I5164502f2d20d5e82e916918ad8556c2b5f7a3d1
changes/96/17396/2
Harald Welte 3 years ago
parent 57c1213aab
commit 637cf54c8c
  1. 3
      mncc_sock.py

@ -154,7 +154,8 @@ class MnccSocket(MnccSocketBase):
class MnccSocketServer(object):
def __init__(self, address = '/tmp/bsc_mncc'):
os.unlink(address)
if os.path.exists(address):
os.unlink(address)
self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_SEQPACKET)
self.sock.bind(address)
self.sock.listen(5)

Loading…
Cancel
Save