Commit d85f6df8 authored by Denis Bilenko's avatar Denis Bilenko

add __repr__ to Hub

parent f1062704
......@@ -251,6 +251,14 @@ class Hub(greenlet):
self._resolver = None
self.format_context = _import(self.format_context)
def __repr__(self):
args = (self.__class__.__name__, id(self), self.loop)
if self._resolver is not None:
args = args + (self._resolver, )
return '<%s at 0x%x loop=%r resolver=%r>' % args
else:
return '<%s at 0x%x loop=%r>' % args
def handle_error(self, context, type, value, tb):
self.print_exception(context, type, value, tb)
if context is None or issubclass(type, self.SYSTEM_ERROR):
......
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