Skip to content

Commit 1d215dd

Browse files
ghernadiGabor Hernadi
authored andcommitted
Exos: Made health_reasons optional
If the JSON response does not contain that field, None is returned when asked for the python property (instead of KeyError)
1 parent e69f3bc commit 1d215dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linstor/responses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ def health(self):
21142114

21152115
@property
21162116
def health_reason(self):
2117-
return self._rest_data["health_reason"]
2117+
return self._rest_data.get("health_reason")
21182118

21192119

21202120
class ExosListResponse(RESTMessageResponse):

0 commit comments

Comments
 (0)