Try to get working on production.
This commit is contained in:
parent
6e6693bfbc
commit
14effc9746
|
@ -90,9 +90,12 @@ def main():
|
||||||
# Make this a string and deal with it later (probably a mistake)
|
# Make this a string and deal with it later (probably a mistake)
|
||||||
a['path'] = str(a['path'])
|
a['path'] = str(a['path'])
|
||||||
# Build an INSERT statement based on the fields we have from the frame
|
# Build an INSERT statement based on the fields we have from the frame
|
||||||
attrib_names = ', '.join(f'"{w}"' for w in a.keys())
|
#attrib_names = ', '.join(f'"{w}"' for w in a.keys())
|
||||||
|
attrib_names = ', '.join('"%s"' % w for w in a.keys())
|
||||||
attrib_values = ", ".join("?" * len(a.keys()))
|
attrib_values = ", ".join("?" * len(a.keys()))
|
||||||
sql = f"INSERT INTO frames ({attrib_names}) VALUES ({attrib_values})"
|
#sql = f"INSERT INTO frames ({attrib_names}) VALUES ({attrib_values})"
|
||||||
|
sql = "INSERT INTO frames ("+attrib_names+") VALUES ("+attrib_values+")"
|
||||||
|
print(sql)
|
||||||
# Insert data
|
# Insert data
|
||||||
conn.execute(sql, list(a.values()))
|
conn.execute(sql, list(a.values()))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
flask
|
flask
|
||||||
flask_restful
|
flask_restful
|
||||||
|
aprs
|
||||||
|
aprslib
|
||||||
|
|
0
start-aprs_api.sh
Normal file → Executable file
0
start-aprs_api.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user