]> git.mxchange.org Git - fba.git/commitdiff
Also missed this SQL keywords
authorRoland Häder <roland@mxchange.org>
Tue, 16 May 2023 23:44:58 +0000 (01:44 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 16 May 2023 23:44:58 +0000 (01:44 +0200)
fetch_blocks.py

index aa09da52463ff2112a17918ec1c73a159096965f..4bbe4eafed130dd4141b94ebc5d96b87bcbe7860 100644 (file)
@@ -284,7 +284,7 @@ for blocker, software in c.fetchall():
                                     })
                         else:
                             c.execute(
-                                "UPDATE blocks set last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
+                                "UPDATE blocks SET last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
                                 (timestamp, blocker, blocked, block_level)
                             )
             conn.commit()
@@ -309,7 +309,7 @@ for blocker, software in c.fetchall():
                             if searchres != None:
                                 blocked = searchres[0]
                         c.execute(
-                            "UPDATE blocks set reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
+                            "UPDATE blocks SET reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
                             (reason["reason"], blocker, blocked, block_level),
                         )
                         for entry in blockdict:
@@ -405,12 +405,12 @@ for blocker, software in c.fetchall():
                                 })
                     else:
                         c.execute(
-                            "UPDATE blocks set last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
+                            "UPDATE blocks SET last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
                             (timestamp, blocker, blocked if blocked.count("*") <= 1 else blocked_hash, block_level),
                         )
                     if reason != '':
                         c.execute(
-                            "UPDATE blocks set reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
+                            "UPDATE blocks SET reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
                             (reason, blocker, blocked if blocked.count("*") <= 1 else blocked_hash, block_level),
                         )
             conn.commit()
@@ -480,12 +480,12 @@ for blocker, software in c.fetchall():
                                 })
                     else:
                         c.execute(
-                            "UPDATE blocks set last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
+                            "UPDATE blocks SET last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
                             (timestamp, blocker, blocked, block_level),
                         )
                     if reason != '':
                         c.execute(
-                            "UPDATE blocks set reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
+                            "UPDATE blocks SET reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
                             (reason, blocker, blocked, block_level),
                         )
             conn.commit()
@@ -535,13 +535,13 @@ for blocker, software in c.fetchall():
                         })
                 else:
                     c.execute(
-                        "UPDATE blocks set last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
+                        "UPDATE blocks SET last_seen = ? WHERE blocker = ? AND blocked = ? AND block_level = ?",
                         (timestamp, blocker, blocked, "reject"),
                     )
                 if "public_comment" in peer:
                     reason = peer["public_comment"]
                     c.execute(
-                        "UPDATE blocks set reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
+                        "UPDATE blocks SET reason = ? WHERE blocker = ? AND blocked = ? AND block_level = ? AND reason = ''",
                         (reason, blocker, blocked, "reject"),
                     )
                     for entry in blockdict: