changed interpolation to format string
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import sqlite3 as sql
|
||||
import subprocess
|
||||
|
||||
# get all maps in database
|
||||
def getmaps(database):
|
||||
output = []
|
||||
con = sql.connect(database)
|
||||
with con:
|
||||
cursor = con.cursor()
|
||||
try:
|
||||
# get all maps in database
|
||||
cursor.execute("select distinct mapid from Cts_times;")
|
||||
output = cursor.fetchall()
|
||||
except sql.Error:
|
||||
@@ -47,7 +47,12 @@ def main():
|
||||
filename = ("./output/maps/%s.html" % map_name)
|
||||
with open(filename, 'w+') as fout:
|
||||
title = map_name
|
||||
fout.write(template % (title, map_name, table))
|
||||
fout.write(template.format(
|
||||
title=title,
|
||||
map_name=map_name,
|
||||
table=table)
|
||||
)
|
||||
# fout.write(template % (title, map_name, table))
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user