]> git.seodisparate.com - AnotherAURHelper/commitdiff
Fix handling of "is_timed" when using log_print()
authorStephen Seo <seo.disparate@gmail.com>
Wed, 7 Jun 2023 04:37:40 +0000 (13:37 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 7 Jun 2023 04:37:40 +0000 (13:37 +0900)
update.py

index aebb99c704887268bef276bb7fe399784cd8b300..56c0ffcc83a459d1d30f07ae96aa59670c61bec0 100755 (executable)
--- 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"
         )