DB config
This commit is contained in:
parent
2e48ec366f
commit
bf4bdd2fa8
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user