probe: fix flake8 nits

This commit is contained in:
Michael Schmoock
2020-12-13 01:12:39 +01:00
committed by Christian Decker
parent 35a2016c95
commit f2a0f50501

View File

@@ -79,6 +79,7 @@ class Probe(Base):
'finished_at': str(self.finished_at),
}
def start_probe(plugin):
t = threading.Thread(target=probe, args=[plugin, None])
t.daemon = True
@@ -140,7 +141,7 @@ def traceroute(plugin, node_id, **kwargs):
return traceroute
# For each prefix length, shorten the route and attempt the payment
for l in range(1, len(traceroute['route'])+1):
for l in range(1, len(traceroute['route']) + 1):
probe = {
'route': traceroute['route'][:l],
'payment_hash': ''.join(random.choice(string.hexdigits) for _ in range(64)),
@@ -221,6 +222,7 @@ def poll_payments(plugin):
del probe['callback']
cb(**probe)
def clear_temporary_exclusion(plugin):
timed_out = [k for k, v in temporary_exclusions.items() if v < time()]
for k in timed_out: