Fixing instance fetcher inserting duplicate rows
This commit is contained in:
parent
d8fc0154b7
commit
4d9b9f39ab
@ -55,6 +55,9 @@ for instance in peerlist:
|
|||||||
instance = instance.lower()
|
instance = instance.lower()
|
||||||
print(instance)
|
print(instance)
|
||||||
try:
|
try:
|
||||||
|
c.execute(
|
||||||
|
"select domain from instances where domain = ?", (instance,)
|
||||||
|
)
|
||||||
if c.fetchone() == None:
|
if c.fetchone() == None:
|
||||||
c.execute(
|
c.execute(
|
||||||
"insert into instances select ?, ?, ?",
|
"insert into instances select ?, ?, ?",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user