fix it?
This commit is contained in:
parent
788b3c5dba
commit
dc5ed393d6
1 changed files with 4 additions and 3 deletions
|
@ -81,9 +81,10 @@ class Gateway(object):
|
|||
log.info("querying %s", self.location)
|
||||
response = yield treq.get(self.location)
|
||||
response_xml = yield response.content()
|
||||
self._device = RootDevice(response_xml)
|
||||
if not self._device.devices or not self._device.services:
|
||||
log.error("failed to parse device: \n%s", response_xml)
|
||||
if response_xml:
|
||||
self._device = RootDevice(response_xml)
|
||||
if not self._device.devices or not self._device.services:
|
||||
log.error("failed to parse device: \n%s", response_xml)
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
|
|
Loading…
Reference in a new issue