Ignore errors in the Velib API

This commit is contained in:
Lucas Verney 2016-01-21 11:55:12 +01:00
parent ed329190be
commit 3f151d17f5
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,7 @@ def db_init():
"timestamp INTEGER, " +
"event TEXT, " +
"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()
return conn
@ -137,6 +137,8 @@ def update_stations():
station["banking"],
station["bonus"],
station["bike_stands"]))
except TypeError:
pass
c.execute("INSERT INTO " +
"stationsstats(station_id, available_bikes, free_stands, status, updated) " +