mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-04-26 16:46:23 +00:00
Prevent failure if device's sysinfo does not have a "feature" attribute. (#77)
This commit is contained in:
parent
d851540380
commit
a621f5329d
@ -86,6 +86,9 @@ class SmartDevice(object):
|
|||||||
:return: list of features
|
:return: list of features
|
||||||
:rtype: list
|
:rtype: list
|
||||||
"""
|
"""
|
||||||
|
if "feature" not in self.sys_info:
|
||||||
|
return None
|
||||||
|
|
||||||
features = self.sys_info['feature'].split(':')
|
features = self.sys_info['feature'].split(':')
|
||||||
|
|
||||||
for feature in features:
|
for feature in features:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user