From 856937d91e600bafc5b831b79d6aca5bd1bf3519 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Mon, 23 Jul 2018 13:41:05 +0200 Subject: tankerkoenig: do not generate 'None' value price --- jobs/tankerkoenig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'jobs/tankerkoenig.py') 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) -- cgit v1.2.1