json load exception info

merge-requests/30/head
Bob Mottram 2024-04-10 18:32:33 +01:00
parent edd6298fa7
commit 4a950cf549
1 changed files with 2 additions and 2 deletions

View File

@ -1239,9 +1239,9 @@ def load_json(filename: str, delay_sec: int = 2, max_tries: int = 5) -> {}:
data = json_file.read() data = json_file.read()
json_object = json.loads(data) json_object = json.loads(data)
break break
except BaseException: except BaseException as exc:
print('EX: load_json exception ' + print('EX: load_json exception ' +
str(tries) + ' ' + str(filename)) str(tries) + ' ' + str(filename) + ' ' + str(exc))
if delay_sec > 0: if delay_sec > 0:
time.sleep(delay_sec) time.sleep(delay_sec)
tries += 1 tries += 1