mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-07 16:10:18 +00:00
Remove extra DELETE FROM - Table has just been created, should alread by empty.
This commit is contained in:
parent
b20b617718
commit
04b5e1a7d3
1 changed files with 7 additions and 10 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue