Skip to content

Commit c7143e0

Browse files
o-gentpeterbarker
authored andcommitted
wind property, return none if attributes are none
1 parent 253eb45 commit c7143e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dronekit/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,8 @@ def wind(self):
17151715
"""
17161716
Current wind status (:pu:class: `Wind`)
17171717
"""
1718+
if self._wind_direction is None or self._wind_speed is None or self._wind_speed_z is None:
1719+
return None
17181720
return Wind(self._wind_direction, self._wind_speed, self._wind_speed_z)
17191721

17201722
@property

0 commit comments

Comments
 (0)