Skip to content

Commit d20d3a8

Browse files
Simplifies table checking
1 parent 85990e7 commit d20d3a8

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
@@ -39,11 +39,11 @@ def checkDB(args):
3939
# list database tables
4040
if (args.verbose):
4141
print('Tables:')
42-
tables = db.query('SHOW TABLES;', ())
43-
if tables.with_rows:
44-
records = tables.fetchall()
45-
for table in records:
46-
print(table)
42+
sql = 'SHOW TABLES'
43+
params = ()
44+
records = db.query(sql, params).fetchall()
45+
for table in records:
46+
print(table)
4747

4848

4949
def compileGames():

0 commit comments

Comments
 (0)