mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
lf_dash.py : try except added around appending to db with different columns
1. the databases need to match with the column layout for kpi, the db may get corrupted, either enter a new db or regenerate old one. Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -65,7 +65,11 @@ class csv_sqlite_dash():
|
||||
self.df = self.df.append(df_kpi_tmp, ignore_index=True)
|
||||
|
||||
self.conn = sqlite3.connect(self.database)
|
||||
self.df.to_sql(self.table,self.conn,if_exists='append')
|
||||
try:
|
||||
self.df.to_sql(self.table,self.conn,if_exists='append')
|
||||
except:
|
||||
print("attempt to append to database with different column layout, casused exception, input new name --database <new name>")
|
||||
exit(1)
|
||||
self.conn.close()
|
||||
|
||||
def generate_graph_png(self):
|
||||
|
||||
Reference in New Issue
Block a user