diff --git a/resotocore/resotocore/model/transform_kind_convert.py b/resotocore/resotocore/model/transform_kind_convert.py index e2299bc66..cda0f2bd4 100644 --- a/resotocore/resotocore/model/transform_kind_convert.py +++ b/resotocore/resotocore/model/transform_kind_convert.py @@ -3,13 +3,13 @@ def datetime_before_now(duration_string: str) -> str: - duration = parse_duration(duration_string) + duration = parse_duration(str(duration_string)) timestamp = utc() - duration return utc_str(timestamp) def duration_until_now(at: str) -> str: - timestamp = from_utc(at) + timestamp = from_utc(str(at)) duration = utc() - timestamp return duration_str(duration, precision=2) diff --git a/resotoshell/resotoshell/__main__.py b/resotoshell/resotoshell/__main__.py index 868696456..e608e72a3 100644 --- a/resotoshell/resotoshell/__main__.py +++ b/resotoshell/resotoshell/__main__.py @@ -209,7 +209,11 @@ def header_value(s: str) -> Tuple[str, str]: default=False, ) arg_parser.add_argument( - "--add-headers", help="Add a header to all requests. Format: key:value", nargs="*", type=header_value + "--add-headers", + help="Add a header to all requests. Format: key:value", + nargs="*", + default=[], + type=header_value, )