Skip to content

Commit 9cff2af

Browse files
Merge pull request #142 from snakeclown/patch-2
Conditionally add execution_time to error output to avoid KeyError
2 parents d103547 + 5f532ec commit 9cff2af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/avalara/ava_logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def wrapper(*args, **kwargs):
4646
raise e
4747
finally:
4848
total_execution_time = time.perf_counter() - execution_start_time
49-
if ava_log_entry["execution_time"] is None:
49+
if "execution_time" not in ava_log_entry:
5050
ava_log_entry["execution_time"] = total_execution_time * 1000
5151
json_data = json.dumps(ava_log_entry, indent=4)
5252
if is_error_log:

0 commit comments

Comments
 (0)