DB config
This commit is contained in:
parent
2e48ec366f
commit
bf4bdd2fa8
@ -46,7 +46,10 @@ def updateLast(db, cursor):
|
|||||||
cursor.execute(sql)
|
cursor.execute(sql)
|
||||||
row = cursor.fetchone()
|
row = cursor.fetchone()
|
||||||
|
|
||||||
if row[0]:
|
if not row[0]:
|
||||||
|
insertNew(db, cursor)
|
||||||
|
|
||||||
|
else:
|
||||||
ins_id = row[0]
|
ins_id = row[0]
|
||||||
|
|
||||||
## hole alle Fahrten nach letzter Ladung
|
## hole alle Fahrten nach letzter Ladung
|
||||||
@ -63,9 +66,7 @@ def updateLast(db, cursor):
|
|||||||
|
|
||||||
print("Anzahl:", len(rows))
|
print("Anzahl:", len(rows))
|
||||||
if len(rows) < 1:
|
if len(rows) < 1:
|
||||||
insertNew(db, cursor)
|
|
||||||
print("Keine neuen Daten vorhanden, beende jetzt.")
|
print("Keine neuen Daten vorhanden, beende jetzt.")
|
||||||
cursor.close()
|
|
||||||
if db:
|
if db:
|
||||||
db.close()
|
db.close()
|
||||||
print("The SQLite connection is closed")
|
print("The SQLite connection is closed")
|
||||||
|
Loading…
Reference in New Issue
Block a user