Fixed a warning
This commit is contained in:
parent
2f81127f23
commit
584117bb0d
|
@ -20,11 +20,7 @@ def batch_insert(table, column, data):
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
|
||||||
def main(file):
|
if __name__ == '__main__':
|
||||||
db = sqlite3.connect(file)
|
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('mcmaniacs', 'item', read_file('mcmaniac.txt'))
|
||||||
batch_insert('yiffs', 'item', read_file('yiff.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])
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user