Ignore errors in the Velib API
This commit is contained in:
parent
ed329190be
commit
3f151d17f5
4
velib.py
4
velib.py
@ -37,7 +37,7 @@ def db_init():
|
|||||||
"timestamp INTEGER, " +
|
"timestamp INTEGER, " +
|
||||||
"event TEXT, " +
|
"event TEXT, " +
|
||||||
"FOREIGN KEY(station_id) REFERENCES stations(id) ON DELETE CASCADE)")
|
"FOREIGN KEY(station_id) REFERENCES stations(id) ON DELETE CASCADE)")
|
||||||
c.execute("CREATE INDEX IF NOT EXISTS stationsevents_station_id ON stationsevents (station_id)");
|
c.execute("CREATE INDEX IF NOT EXISTS stationsevents_station_id ON stationsevents (station_id)");
|
||||||
conn.commit()
|
conn.commit()
|
||||||
return conn
|
return conn
|
||||||
|
|
||||||
@ -137,6 +137,8 @@ def update_stations():
|
|||||||
station["banking"],
|
station["banking"],
|
||||||
station["bonus"],
|
station["bonus"],
|
||||||
station["bike_stands"]))
|
station["bike_stands"]))
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
c.execute("INSERT INTO " +
|
c.execute("INSERT INTO " +
|
||||||
"stationsstats(station_id, available_bikes, free_stands, status, updated) " +
|
"stationsstats(station_id, available_bikes, free_stands, status, updated) " +
|
||||||
|
Loading…
Reference in New Issue
Block a user