From 8a86babb8cbc8b3a6bdcdece69c05330ea88b29f Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 7 Jun 2023 13:37:40 +0900 Subject: [PATCH] Fix handling of "is_timed" when using log_print() --- update.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update.py b/update.py index aebb99c..56c0ffc 100755 --- a/update.py +++ b/update.py @@ -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" )