unix: add Listener.__repr__.

This commit is contained in:
David Wilson 2019-01-19 22:44:11 +00:00
parent ae03d5f4f1
commit 3b17cb7c5b
1 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,13 @@ def make_socket_path():
class Listener(mitogen.core.BasicStream):
keep_alive = True
def __repr__(self):
return '%s.%s(%r)' % (
__name__,
self.__class__.__name__,
self.path,
)
def __init__(self, router, path=None, backlog=100):
self._router = router
self.path = path or make_socket_path()