mirror of
https://amiok.net/gitea/W1CDN/aprs_tool.git
synced 2025-07-26 21:36:15 +00:00
Clean up a bit.
This commit is contained in:
@@ -70,9 +70,8 @@ def main():
|
||||
try:
|
||||
# Insert data
|
||||
sql = "INSERT INTO frames ("+attrib_names+") VALUES ("+attrib_values+")"
|
||||
logging.debug(sql)
|
||||
conn.execute(sql, list(a.values()))
|
||||
|
||||
logging.debug("Frames table updated")
|
||||
# TODO update stations table here
|
||||
# Original intent was to include the id from the frames table,
|
||||
# but that would mean making another query.
|
||||
@@ -87,11 +86,9 @@ def main():
|
||||
ON CONFLICT([from]) \
|
||||
DO UPDATE SET count = count + 1,\
|
||||
last_heard_unix = excluded.last_heard_unix;"
|
||||
#print(query3)
|
||||
logging.debug(query3)
|
||||
# Insert/update data
|
||||
conn.execute(query3)
|
||||
|
||||
logging.debug("Station table updated")
|
||||
conn.commit()
|
||||
#except:
|
||||
# print("Stations table couldn't be updated.")
|
||||
|
Reference in New Issue
Block a user