mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
Properly raise ValueError message in wait_for
This commit is contained in:
committed by
Christian Decker
parent
5b3746172f
commit
c79c9c73fc
@@ -90,7 +90,7 @@ def wait_for(success, timeout=TIMEOUT):
|
||||
while not success():
|
||||
time_left = start_time + timeout - time.time()
|
||||
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))
|
||||
interval *= 2
|
||||
if interval > 5:
|
||||
|
||||
Reference in New Issue
Block a user