Skip to content

Commit be7f68e

Browse files
authored
Description is an optional entry for a station (#9)
1 parent f8d8d62 commit be7f68e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opensensemap_api/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ async def get_data(self):
6363
@property
6464
def description(self):
6565
"""Return the description of the station."""
66-
return self.data["description"]
66+
try:
67+
return self.data["description"]
68+
except KeyError:
69+
return None
6770

6871
@property
6972
def name(self):

0 commit comments

Comments
 (0)