From 05a9df054024a809a0822d0656f7b8a461e4b5c5 Mon Sep 17 00:00:00 2001 From: TimJentzsch Date: Fri, 30 Jun 2023 21:48:45 +0200 Subject: [PATCH] Fix wrong key access when checking if post is already removed (#52) * Add better logging for crashes * Fix wrong key access in queue sync --- tor_archivist/core/helpers.py | 2 +- tor_archivist/core/queue_sync.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tor_archivist/core/helpers.py b/tor_archivist/core/helpers.py index 52a70f7..982abce 100644 --- a/tor_archivist/core/helpers.py +++ b/tor_archivist/core/helpers.py @@ -58,7 +58,7 @@ def explode_gracefully(error: RuntimeError) -> None: :param tor: the r/ToR helper object :return: Nothing. Everything dies here. """ - logging.critical(error) + logging.exception(error, exc_info=True) sys.exit(1) diff --git a/tor_archivist/core/queue_sync.py b/tor_archivist/core/queue_sync.py index c68df8b..c658fd5 100644 --- a/tor_archivist/core/queue_sync.py +++ b/tor_archivist/core/queue_sync.py @@ -76,7 +76,7 @@ def _auto_report_handling(cfg: Config, r_submission: Any, b_submission: Dict, re # Check if the post has been removed by a mod if r_submission.removed_by_category: - if not b_submission["removed_from_reddit"]: + if not b_submission["removed_from_queue"]: remove_on_blossom(cfg, b_submission) # We can ignore the report return True