Handle breaking errors in kiss_and_db.py #38

Merged
W1CDN merged 9 commits from fix-kiss into main 2023-12-13 20:20:59 -06:00
Showing only changes of commit 50085de7db - Show all commits

View File

@ -66,15 +66,18 @@ def main():
try:
try:
a = aprslib.parse(str(frame))
except:
logging.error("Error with aprslib!")
except Exception as error:
logging.error("Error with aprslib:", error)
a['station_call'] = config['Settings']['station_call']
a['station_lat'] = config['Settings']['station_lat']
a['station_lon'] = config['Settings']['station_lon']
a['created_unix'] = int(time.time())
print(a)
# Make this a string and deal with it later (probably a mistake)
a['path'] = str(a['path'])
if 'subpacket' in a:
a['subpacket'] = str(a['subpacket'])
#logging.debug(a['path'])
# Store true/false as 1/0
if 'alive' in a:
if a['alive'] == True:
@ -121,9 +124,9 @@ def main():
except:
#print("Error with SQLite!")
logging.error("Error with SQLite!")
except:
except Exception as error:
#print("Frame could not be parsed.")
logging.error("Frame could not be parsed.")
logging.error("Frame could not be parsed:", error)
conn.close()