Fix handling of "is_timed" when using log_print()

This commit is contained in:
Stephen Seo 2023-06-07 13:37:40 +09:00
parent 56ffb57fe3
commit 8a86babb8c

View file

@ -203,7 +203,11 @@ class ArchPkgVersion:
def log_print(*args, **kwargs):
"""Prints to stdout, then logs to GLOBAL_LOG_FILE."""
if "other_state" in kwargs and "is_timed" in kwargs["other_state"]:
if (
"other_state" in kwargs
and "is_timed" in kwargs["other_state"]
and kwargs["other_state"]["is_timed"]
):
t = datetime.datetime.now(datetime.timezone.utc).strftime(
"%Y-%m-%d_%H-%M-%S_%Z"
)