Fix AttributeError traceback with darksky (#22101)

* Update darksky.py

* fixes
This commit is contained in:
Tyler Page authored and Fabian Affolter committed 2019-03-17 12:06:39 +01:00
1 parent 1aab551eed
commit 9b1491a98d
1 file changed
+2
@@ -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')