mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-27 05:28:23 +00:00
Move PRAGMA command to first step after cursor creation.
This commit is contained in:
parent
e9ff14daf3
commit
9f94570fff
1 changed files with 3 additions and 3 deletions
|
@ -24,6 +24,9 @@ conn = sqlite3.connect('/etc/pihole/gravity.db')
|
|||
with conn:
|
||||
c = conn.cursor()
|
||||
|
||||
# enable WAL mode
|
||||
c.execute('PRAGMA journal_mode=WAL;')
|
||||
|
||||
# Lists have just been downloaded, clear out the existing data
|
||||
c.execute('DROP TABLE IF EXISTS gravity')
|
||||
|
||||
|
@ -36,9 +39,6 @@ with conn:
|
|||
'''
|
||||
c.execute(gt)
|
||||
|
||||
# enable WAL mode
|
||||
c.execute('PRAGMA journal_mode=WAL;')
|
||||
|
||||
# Parse the log file into the database
|
||||
with open(logfile) as f:
|
||||
for line in f:
|
||||
|
|
Loading…
Add table
Reference in a new issue