From 06977d737a2689210b11e798801e0bd8c2dbc8c7 2013-01-19 05:20:13 From: MinRK Date: 2013-01-19 05:20:13 Subject: [PATCH] fix default heartbeat location when transport is ipc --- diff --git a/IPython/zmq/heartbeat.py b/IPython/zmq/heartbeat.py index 049483e..16e6ce4 100644 --- a/IPython/zmq/heartbeat.py +++ b/IPython/zmq/heartbeat.py @@ -41,7 +41,8 @@ class Heartbeat(Thread): self.port = s.getsockname()[1] s.close() elif addr[0] == 'ipc': - while os.path.exists(self.ip + '-' + self.port): + self.port = 1 + while os.path.exists("%s-%s" % (self.ip, self.port)): self.port = self.port + 1 else: raise ValueError("Unrecognized zmq transport: %s" % addr[0])