Skip to content

Commit c9d70ab

Browse files
Fix key error for unknown statuses
1 parent 5e5800a commit c9d70ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

weconnect/elements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def updateStatus(self, updateCapabilities=True, force=False): # noqa: C901 # py
243243
for status, error in data['error'].items():
244244
if status in self.statuses:
245245
self.statuses[status].updateError(fromDict=error)
246-
else:
246+
elif status in keyClassMap:
247247
self.statuses[status] = keyClassMap[status](vehicle=self, parent=self.statuses, statusId=status,
248248
fromDict=None, fixAPI=self.fixAPI)
249249
self.statuses[status].updateError(fromDict=error)

0 commit comments

Comments
 (0)