diff --git a/advanced/Scripts/gravity_parse.py b/advanced/Scripts/gravity_parse.py index 42446f4e..ff2cc44f 100644 --- a/advanced/Scripts/gravity_parse.py +++ b/advanced/Scripts/gravity_parse.py @@ -47,7 +47,7 @@ import sqlite3 logfile = '/etc/pihole/pihole.2.eventHorizon.txt' # Create the SQLite connection -conn = sqlite3.connect('/etc/pihole/pihole.db') +conn = sqlite3.connect('/etc/pihole/gravity.db') # Python auto-handle commits, no need to call for commits manually with conn: @@ -71,5 +71,6 @@ with conn: # Parse the log file into the database with open(logfile) as f: for line in f: + line = line.rstrip() sql = "INSERT INTO gravity (domain) VALUES (?)" c.execute(sql, (line,))