Fixed a warning

This commit is contained in:
mrhanky 2017-05-29 13:28:08 +02:00
parent 2f81127f23
commit 584117bb0d
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -20,11 +20,7 @@ def batch_insert(table, column, data):
db.commit()
def main(file):
db = sqlite3.connect(file)
if __name__ == '__main__':
db = sqlite3.connect('db.sqlite' if len(sys.argv) is 0 else sys.argv[0])
batch_insert('mcmaniacs', 'item', read_file('mcmaniac.txt'))
batch_insert('yiffs', 'item', read_file('yiff.txt'))
if __name__ == '__main__':
main('db.sqlite' if len(sys.argv) is 0 else sys.argv[0])