We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 00f4a99 + 7cb394e commit 6d4aff6Copy full SHA for 6d4aff6
1 file changed
resources/scenarios/ln_framework/ln.py
@@ -430,12 +430,17 @@ def newaddress(self, max_tries=10):
430
while attempt < max_tries:
431
attempt += 1
432
response = self.get("/v1/newaddress")
433
- res = json.loads(response)
434
- if "address" in res:
435
- return True, res["address"]
436
- else:
+ try:
+ res = json.loads(response)
+ if "address" in res:
+ return True, res["address"]
437
+ else:
438
+ self.log.warning(
439
+ f"Couldn't get wallet address from {self.name}:\n {res}\n wait and retry..."
440
+ )
441
+ except Exception:
442
self.log.warning(
- f"Couldn't get wallet address from {self.name}:\n {res}\n wait and retry..."
443
+ f"Couldn't decode newaddress JSON from {self.name}:\n {response}\n wait and retry..."
444
)
445
sleep(1)
446
return False, ""
0 commit comments