Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _add_endpoints(self, endpoints):
assert self._state is RUNNING
endpoints = [
(e if isinstance(e, ZmqEndpoint)
else (ZmqEndpoint(*e) if isinstance(e, tuple)
else ZmqEndpoint(self.DEFAULT_ENDPOINT_TYPE, e)))
for e in endpoints
]
self._endpoints.extend(endpoints)
self._conn.addEndpoints(endpoints)
def _add_endpoints(self, endpoints):
assert self._state is RUNNING
endpoints = [
(e if isinstance(e, ZmqEndpoint)
else (ZmqEndpoint(*e) if isinstance(e, tuple)
else ZmqEndpoint(self.DEFAULT_ENDPOINT_TYPE, e)))
for e in endpoints
]
self._endpoints.extend(endpoints)
self._conn.addEndpoints(endpoints)
def add_endpoints(self, endpoints):
if self._state is NOT_STARTED:
self._pending_endpoints += endpoints
return
endpoints = [
(e if isinstance(e, ZmqEndpoint)
else (ZmqEndpoint(*e) if isinstance(e, tuple)
else ZmqEndpoint(self.DEFAULT_ENDPOINT_TYPE, e)))
for e in endpoints
]
self._endpoints.extend(endpoints)
self._conn.addEndpoints(endpoints)
def _add_endpoints(self, endpoints):
assert self._state is RUNNING
endpoints = [
(e if isinstance(e, ZmqEndpoint)
else (ZmqEndpoint(*e) if isinstance(e, tuple)
else ZmqEndpoint(self.DEFAULT_ENDPOINT_TYPE, e)))
for e in endpoints
]
self._endpoints.extend(endpoints)
self._conn.addEndpoints(endpoints)
def add_endpoints(self, endpoints):
if self._state is NOT_STARTED:
self._pending_endpoints += endpoints
return
endpoints = [
(e if isinstance(e, ZmqEndpoint)
else (ZmqEndpoint(*e) if isinstance(e, tuple)
else ZmqEndpoint(self.DEFAULT_ENDPOINT_TYPE, e)))
for e in endpoints
]
self._endpoints.extend(endpoints)
self._conn.addEndpoints(endpoints)