try something

This commit is contained in:
Jack Robison 2018-07-31 17:53:00 -04:00
parent 519c6503a4
commit 7d591b5408
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -98,7 +98,8 @@ class Device(CaseInsensitive):
new_services = [new_services]
services.extend([Service(**service) for service in new_services])
if self.deviceList:
devices.extend([Device(devices, services, **kw) for kw in self.deviceList.values()])
devices.extend([Device(devices, services, **(kw if isinstance(kw, dict) else kw[0]))
for kw in self.deviceList.values()])
class Gateway(object):