set_trace: tolerate an Automat that lacks m.setTrace
wormhole.debug_set_trace() won't work until glyph/automat#56 lands, but this should let travis do its job in the meantime.
This commit is contained in:
parent
76f5960517
commit
228e0ed671
|
@ -10,7 +10,7 @@ from . import _interfaces
|
|||
class Allocator(object):
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def wire(self, rendezvous_connector, code):
|
||||
self._RC = _interfaces.IRendezvousConnector(rendezvous_connector)
|
||||
|
|
|
@ -39,7 +39,7 @@ class Boss(object):
|
|||
_tor_manager = attrib() # TODO: ITorManager or None
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._build_workers()
|
||||
|
|
|
@ -13,7 +13,7 @@ def first(outputs):
|
|||
class Code(object):
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def wire(self, boss, allocator, nameplate, key, input):
|
||||
self._B = _interfaces.IBoss(boss)
|
||||
|
|
|
@ -13,7 +13,7 @@ def first(outputs):
|
|||
class Input(object):
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._all_nameplates = set()
|
||||
|
|
|
@ -64,7 +64,7 @@ class Key(object):
|
|||
_side = attrib(validator=instance_of(type(u"")))
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._SK = _SortedKey(self._appid, self._versions, self._side,
|
||||
|
@ -113,7 +113,7 @@ class _SortedKey(object):
|
|||
_side = attrib(validator=instance_of(type(u"")))
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def wire(self, boss, mailbox, receive):
|
||||
self._B = _interfaces.IBoss(boss)
|
||||
|
|
|
@ -10,7 +10,7 @@ from . import _interfaces
|
|||
class Lister(object):
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def wire(self, rendezvous_connector, input):
|
||||
self._RC = _interfaces.IRendezvousConnector(rendezvous_connector)
|
||||
|
|
|
@ -10,7 +10,7 @@ from . import _interfaces
|
|||
class Mailbox(object):
|
||||
_side = attrib(validator=instance_of(type(u"")))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._mailbox = None
|
||||
|
|
|
@ -7,7 +7,7 @@ from ._wordlist import PGPWordList
|
|||
@implementer(_interfaces.INameplate)
|
||||
class Nameplate(object):
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __init__(self):
|
||||
self._nameplate = None
|
||||
|
|
|
@ -11,7 +11,7 @@ class Order(object):
|
|||
_side = attrib(validator=instance_of(type(u"")))
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._key = None
|
||||
|
|
|
@ -12,7 +12,7 @@ class Receive(object):
|
|||
_side = attrib(validator=instance_of(type(u"")))
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._key = None
|
||||
|
|
|
@ -12,7 +12,7 @@ class Send(object):
|
|||
_side = attrib(validator=instance_of(type(u"")))
|
||||
_timing = attrib(validator=provides(_interfaces.ITiming))
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __attrs_post_init__(self):
|
||||
self._queue = []
|
||||
|
|
|
@ -6,7 +6,7 @@ from . import _interfaces
|
|||
@implementer(_interfaces.ITerminator)
|
||||
class Terminator(object):
|
||||
m = MethodicalMachine()
|
||||
set_trace = m.setTrace
|
||||
set_trace = getattr(m, "setTrace", lambda self, f: None)
|
||||
|
||||
def __init__(self):
|
||||
self._mood = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user