This commit is contained in:
Jack Robison 2018-07-31 18:41:20 -04:00
parent bde1ab442b
commit 9e8cf0ac26
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -102,9 +102,9 @@ class Device(CaseInsensitive):
if isinstance(kw, dict):
d = Device(devices, services, **kw)
devices.append(d)
else:
if len(kw) == 1 and isinstance(kw[0], dict):
d = Device(devices, services, **kw[0])
elif isinstance(kw, list):
for _inner_kw in kw:
d = Device(devices, services, **_inner_kw)
devices.append(d)
else:
log.warning("failed to parse device:\n%s", kw)