mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
Properly raise ValueError message in wait_for
This commit is contained in:
parent
5b3746172f
commit
c79c9c73fc
@ -90,7 +90,7 @@ def wait_for(success, timeout=TIMEOUT):
|
|||||||
while not success():
|
while not success():
|
||||||
time_left = start_time + timeout - time.time()
|
time_left = start_time + timeout - time.time()
|
||||||
if time_left <= 0:
|
if time_left <= 0:
|
||||||
raise ValueError("Timeout while waiting for {}", success)
|
raise ValueError("Timeout while waiting for {}".format(success))
|
||||||
time.sleep(min(interval, time_left))
|
time.sleep(min(interval, time_left))
|
||||||
interval *= 2
|
interval *= 2
|
||||||
if interval > 5:
|
if interval > 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user