Fix AttributeError traceback with darksky (#22101)

* Update darksky.py

* fixes
This commit is contained in:
Tyler Page 2019-03-17 11:06:40 +00:00 committed by Fabian Affolter
parent 1aab551eed
commit 9b1491a98d

View File

@ -232,4 +232,6 @@ class DarkSkyData:
@property
def units(self):
"""Get the unit system of returned data."""
if self.data is None:
return None
return self.data.json.get('flags').get('units')