DB config

This commit is contained in:
Manuel Weiser 2024-05-11 11:23:14 +02:00
parent 2e48ec366f
commit bf4bdd2fa8

View File

@ -46,7 +46,10 @@ def updateLast(db, cursor):
cursor.execute(sql)
row = cursor.fetchone()
if row[0]:
if not row[0]:
insertNew(db, cursor)
else:
ins_id = row[0]
## hole alle Fahrten nach letzter Ladung
@ -63,9 +66,7 @@ def updateLast(db, cursor):
print("Anzahl:", len(rows))
if len(rows) < 1:
insertNew(db, cursor)
print("Keine neuen Daten vorhanden, beende jetzt.")
cursor.close()
if db:
db.close()
print("The SQLite connection is closed")