Skip to content
Browse files

Made verbose repr for Endpoints be split over newlines

  • Loading branch information...
1 parent bf5e651 commit 36636d6c8b2f31877701cbef84ab1a853d286215 @daf daf committed
Showing with 4 additions and 4 deletions.
  1. +1 −1 pyon/event/event.py
  2. +3 −3 pyon/ion/endpoint.py
View
2 pyon/event/event.py
@@ -222,7 +222,7 @@ def stop(self):
log.info("EventSubscriber stopped. Event pattern=%s" % self.binding)
def __str__(self):
- return "EventSubscriber: recv_name: %s, cb: %s" % (str(self._recv_name), str(self._callback))
+ return "EventSubscriber at %s:\n\trecv_name: %s\n\tcb: %s" % (hex(id(self)), str(self._recv_name), str(self._callback))
class EventRepository(object):
"""
View
6 pyon/ion/endpoint.py
@@ -284,7 +284,7 @@ def create_endpoint(self, **kwargs):
return RPCServer.create_endpoint(self, **newkwargs)
def __str__(self):
- return "ProcessRPCServer: recv_name: %s, process: %s" % (str(self._recv_name), str(self._process))
+ return "ProcessRPCServer at %s:\n\trecv_name: %s\n\tprocess: %s" % (hex(id(self)), str(self._recv_name), str(self._process))
class ProcessPublisherEndpointUnit(ProcessEndpointUnitMixin, PublisherEndpointUnit):
def __init__(self, process=None, **kwargs):
@@ -401,7 +401,7 @@ def create_endpoint(self, **kwargs):
return Subscriber.create_endpoint(self, **newkwargs)
def __str__(self):
- return "ProcessSubscriber: recv_name: %s, process: %s, cb: %s" % (str(self._recv_name), str(self._process), str(self._callback))
+ return "ProcessSubscriber at %s:\n\trecv_name: %s\n\tprocess: %s\n\tcb: %s" % (hex(id(self)), str(self._recv_name), str(self._process), str(self._callback))
#
@@ -419,5 +419,5 @@ def __init__(self, xp_name=None, event_type=None, origin=None, queue_name=None,
ProcessSubscriber.__init__(self, from_name=self._ev_recv_name, binding=self.binding, callback=callback, process=process, routing_call=routing_call, **kwargs)
def __str__(self):
- return "ProcessEventSubscriber: recv_name: %s, process: %s, cb: %s" % (str(self._recv_name), str(self._process), str(self._callback))
+ return "ProcessEventSubscriber at %s:\n\trecv_name: %s\n\tprocess: %s\n\tcb: %s" % (hex(id(self)), str(self._recv_name), str(self._process), str(self._callback))

0 comments on commit 36636d6

Please sign in to comment.
Something went wrong with that request. Please try again.