Fixed some indenting so outputs are only called when there's something to output. Hopefully also fixed that pesky NoneType error.

This commit is contained in:
Nick Foster
2010-10-23 16:51:09 -07:00
parent 839596a4b2
commit 0d4194ef84
4 changed files with 13 additions and 11 deletions

View File

@@ -25,9 +25,9 @@ import modes_parse
import sqlite3
class modes_output_sql(modes_parse.modes_parse):
def __init__(self):
def __init__(self, filename):
#create the database
self.db = sqlite3.connect('adsb.db')
self.db = sqlite3.connect(filename)
#now execute a schema to create the tables you need
c = self.db.cursor()
query = """CREATE TABLE IF NOT EXISTS "positions" (