minor layout changes
This commit is contained in:
parent
4a5c32e375
commit
69799bd11e
1 changed files with 5 additions and 3 deletions
|
@ -55,7 +55,8 @@ def get_service(hass, config):
|
|||
return None
|
||||
|
||||
nma = Session()
|
||||
response = nma.get(_RESOURCE + 'verify', params={"apikey" : config[DOMAIN][CONF_API_KEY]})
|
||||
response = nma.get(_RESOURCE + 'verify',
|
||||
params={"apikey" : config[DOMAIN][CONF_API_KEY]})
|
||||
tree = ET.fromstring(response.content)
|
||||
if tree[0].tag == 'error':
|
||||
_LOGGER.error(
|
||||
|
@ -88,9 +89,10 @@ class NmaNotificationService(BaseNotificationService):
|
|||
self._data['description'] = message
|
||||
self._data['priority'] = 0
|
||||
|
||||
response = self.nma.get(_RESOURCE + 'notify', params=self._data)
|
||||
response = self.nma.get(_RESOURCE + 'notify',
|
||||
params=self._data)
|
||||
tree = ET.fromstring(response.content)
|
||||
if tree[0].tag == 'error':
|
||||
_LOGGER.exception(
|
||||
"Unable to perform request. "
|
||||
"Error: {}".format(tree[0].text))
|
||||
"Error: {}".format(tree[0].text))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue