From 829c9d9e44db54e262fa82da060c192c522dbc22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 21 May 2023 19:36:42 +0200 Subject: [PATCH] Continued: - no local variable needed --- fetch_blocks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fetch_blocks.py b/fetch_blocks.py index 7f5d857..247d15d 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -403,13 +403,12 @@ for blocker, software in fba.cursor.fetchall(): fba.update_last_seen(blocker, blocked, "reject") if "public_comment" in peer: - reason = peer["public_comment"] - # NOISY-DEBUG: print("DEBUG: Updating block reason:", blocker, blocked, reason) - fba.update_block_reason(reason, blocker, blocked, "reject") + # NOISY-DEBUG: print("DEBUG: Updating block reason:", blocker, blocked, peer["public_comment"]) + fba.update_block_reason(peer["public_comment"], blocker, blocked, "reject") for entry in blockdict: if entry["blocked"] == blocked: - entry["reason"] = reason + entry["reason"] = peer["public_comment"] fba.connection.commit() except Exception as e: -- 2.39.5