This commit is contained in:
Jack Robison 2018-07-28 23:25:13 -04:00
parent 7c26e7e6a7
commit 94a65e5d8f
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -54,14 +54,15 @@ class RootDevice(object):
log.exception("failed to decode xml") log.exception("failed to decode xml")
log.error(xml_string) log.error(xml_string)
log.info(binascii.hexlify(xml_string)) log.info(binascii.hexlify(xml_string))
return root = {}
self.spec_version = root.get(SPEC_VERSION) self.spec_version = root.get(SPEC_VERSION)
self.url_base = root["URLBase"] self.url_base = root.get("URLBase")
self.devices = [] self.devices = []
self.services = [] self.services = []
root_device = Device(self, **(root["device"])) if root:
self.devices.append(root_device) root_device = Device(self, **(root["device"]))
log.info("finished setting up root device. %i devices and %i services", len(self.devices), len(self.services)) self.devices.append(root_device)
log.info("finished setting up root device. %i devices and %i services", len(self.devices), len(self.services))
class Gateway(object): class Gateway(object):