diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2023-09-29 10:42:41 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2023-09-29 10:42:41 +0200 |
commit | d1e920446af6eaf226d16cd87be33eaeef9e10c5 (patch) | |
tree | 55bb5c45454eb5cbf28c2904092aee133519c2a7 | |
parent | 2e40db31fe6d4f72c93048e5bd0f9116772fea12 (diff) |
analyze-log: improve debug output
-rwxr-xr-x | bin/analyze-log.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/analyze-log.py b/bin/analyze-log.py index 91197b9..e84446e 100755 --- a/bin/analyze-log.py +++ b/bin/analyze-log.py @@ -19,9 +19,13 @@ import re def kv_to_param(kv_str, cast): - key, value = kv_str.split("=") - value = cast(value) - return key, value + try: + key, value = kv_str.split("=") + value = cast(value) + return key, value + except ValueError: + print(f"Invalid key-value pair: {kv_str}") + raise def kv_to_param_f(kv_str): |