X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/d050dc1f022736a735a8cf1215635e90e615ae4a..10786a2376ce845c73459efad65a02c5457ff379:/owm.py?ds=sidebyside diff --git a/owm.py b/owm.py index 74fe6c4..d97d57e 100755 --- a/owm.py +++ b/owm.py @@ -52,7 +52,7 @@ def extractweatherdata(w): data['winddegrees'] = w['wind']['deg'] if 'deg' in w['wind'] else math.nan data['winddirection'] = degToCompass(data['winddegrees']) - data['precipitation'] = w['rain']['3h'] if 'rain' in w else math.nan + data['precipitation'] = w['rain']['3h'] if 'rain' in w and w['rain'].get('3h') else math.nan data['visibility'] = w.get('visibility', math.nan) return data