diff --git a/src/wormhole/_dilation/connection.py b/src/wormhole/_dilation/connection.py index 36e7211..8bb82aa 100644 --- a/src/wormhole/_dilation/connection.py +++ b/src/wormhole/_dilation/connection.py @@ -473,13 +473,13 @@ class DilatedConnectionProtocol(Protocol, object): At any given time, there is at most one active L2 connection. """ - _eventual_queue = attrib() + _eventual_queue = attrib(repr=False) _role = attrib() _description = attrib() - _connector = attrib(validator=provides(IDilationConnector)) - _noise = attrib() - _outbound_prologue = attrib(validator=instance_of(bytes)) - _inbound_prologue = attrib(validator=instance_of(bytes)) + _connector = attrib(validator=provides(IDilationConnector), repr=False) + _noise = attrib(repr=False) + _outbound_prologue = attrib(validator=instance_of(bytes), repr=False) + _inbound_prologue = attrib(validator=instance_of(bytes), repr=False) _use_relay = False _relay_handshake = None diff --git a/src/wormhole/_dilation/roles.py b/src/wormhole/_dilation/roles.py index 8f9adac..001566b 100644 --- a/src/wormhole/_dilation/roles.py +++ b/src/wormhole/_dilation/roles.py @@ -1 +1,7 @@ -LEADER, FOLLOWER = object(), object() +class _Role(object): + def __init__(self, which): + self._which = which + def __repr__(self): + return "Role(%s)" % self._which + +LEADER, FOLLOWER = _Role("LEADER"), _Role("FOLLOWER")