Commit 22b53454 authored by JonathanMM's avatar JonathanMM

Protection contre les mauvais codes de station

parent 37535062
......@@ -38,7 +38,12 @@ def getAllStation():
data = json.load(open(tmpFileName))
for etatStation in data:
infoStation = etatStation['station']
codeStation = int(infoStation['code'])
codeStation = int(infoStation['code'])
except Exception:
codeStation = 0
if codeStation > 100:
if codeStation not in stations:
longitude = infoStation['gps']['longitude']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment