diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -75,10 +75,13 @@ def export_choice(): def export(opt): # Defensive handling of input if opt in ["temperature", "weather", "history", "schedule"]: - data = db.exec("select * from {}".format(opt)) + con = sqlite3.connect(self.dbfile) + cur = con.cursor() + data = cur.exec("select * from {}".format(opt)) o = "" for i in data: o += str(a) + "\n" + con.close() return o else: return render_template( |
