diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2018-07-23 13:41:05 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2018-07-23 13:41:05 +0200 |
commit | 856937d91e600bafc5b831b79d6aca5bd1bf3519 (patch) | |
tree | 186d22878b2ed4f8f6acabd7da7b73435a50034e | |
parent | 5d421ad266907a66b937338c8ea54df085f47bae (diff) | |
download | datasources-856937d91e600bafc5b831b79d6aca5bd1bf3519.tar.gz datasources-856937d91e600bafc5b831b79d6aca5bd1bf3519.zip |
tankerkoenig: do not generate 'None' value price
-rwxr-xr-x | jobs/tankerkoenig.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jobs/tankerkoenig.py b/jobs/tankerkoenig.py index 90b92ba..99689c9 100755 --- a/jobs/tankerkoenig.py +++ b/jobs/tankerkoenig.py @@ -25,11 +25,11 @@ def execute(api_key : str, lat: float, lng : float, rad: float) -> typing.Iterab if not station['isOpen'] == True: continue - if "diesel" in station: + if "diesel" in station and station['diesel'] is not None: yield Data(name, station['id'], 'Diesel', station['diesel']) - if "e5" in station: + if "e5" in station and station['e5'] is not None: yield Data(name, station['id'], 'SP95-E5', station['e5']) - if "e10" in station: + if "e10" in station and station['e10'] is not None: yield Data(name, station['id'], 'SP95-E10', station['e10']) except Exception as e: logging.error("Failed for: %f %f %f", lat, lng, rad) |