Skip to content

Commit 62d8f7c

Browse files
Simplifies table checking
1 parent 429efbd commit 62d8f7c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

trapp/command_line.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ def checkDB(args):
4040
# list database tables
4141
if (args.verbose):
4242
print('Tables:')
43-
tables = db.query('SHOW TABLES;', ())
44-
if tables.with_rows:
45-
records = tables.fetchall()
46-
for table in records:
47-
print(table)
43+
sql = 'SHOW TABLES'
44+
params = ()
45+
records = db.query(sql, params).fetchall()
46+
for table in records:
47+
print(table)
4848

4949

5050
def compileGames():

0 commit comments

Comments
 (0)