From 4d9b9f39ab2edebcdd19f807b0cbecbf11a61843 Mon Sep 17 00:00:00 2001 From: Mint <> Date: Sun, 7 Aug 2022 09:24:20 +0300 Subject: [PATCH] Fixing instance fetcher inserting duplicate rows --- fetch_instances.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fetch_instances.py b/fetch_instances.py index c59d7fa..1433398 100644 --- a/fetch_instances.py +++ b/fetch_instances.py @@ -55,6 +55,9 @@ for instance in peerlist: instance = instance.lower() print(instance) try: + c.execute( + "select domain from instances where domain = ?", (instance,) + ) if c.fetchone() == None: c.execute( "insert into instances select ?, ?, ?", -- 2.39.5