Remove extra DELETE FROM - Table has just been created, should alread by empty.

This commit is contained in:
Dan Schaper 2016-10-01 20:03:50 -07:00
parent b20b617718
commit 04b5e1a7d3

View file

@ -71,19 +71,16 @@ counts = {'lc': 0}
# Create the SQLite connection
conn = sqlite3.connect('/etc/pihole/pihole.db')
conn.text_factory = str # I don't like it as a fix, but it works for now
c = conn.cursor()
create_tables()
with conn:
c = conn.cursor()
sql = "DELETE FROM gravity"
c.execute(sql)
conn.commit()
create_tables()
# Parse the log file.
for line in open(logfile):
line = line.rstrip()
counts['lc'] += 1
# Parse the log file.
for line in open(logfile):
line = line.rstrip()
counts['lc'] += 1
if (counts['lc'] % 10000) == 0:
conn.commit()