Fix AttributeError traceback with darksky (#22101)
* Update darksky.py * fixes
This commit is contained in:
parent
1aab551eed
commit
9b1491a98d
1 changed files with 2 additions and 0 deletions
|
@ -232,4 +232,6 @@ class DarkSkyData:
|
||||||
@property
|
@property
|
||||||
def units(self):
|
def units(self):
|
||||||
"""Get the unit system of returned data."""
|
"""Get the unit system of returned data."""
|
||||||
|
if self.data is None:
|
||||||
|
return None
|
||||||
return self.data.json.get('flags').get('units')
|
return self.data.json.get('flags').get('units')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue