Style fixes

pull/600/head
Paulus Schoutsen 2015-11-08 22:21:02 -08:00
parent 3b3f5fe6fe
commit 98b4c27211
2 changed files with 6 additions and 5 deletions

View File

@ -20,10 +20,10 @@ _LOGGER = logging.getLogger(__name__)
def get_service(hass, config):
""" Get the mail notification service. """
if not validate_config(
{DOMAIN: config},
{DOMAIN: ['server', 'port', 'sender', 'username', 'password',
'recipient']}, _LOGGER):
if not validate_config({DOMAIN: config},
{DOMAIN: ['server', 'port', 'sender', 'username',
'password', 'recipient']},
_LOGGER):
return None
smtp_server = config['server']

View File

@ -50,6 +50,7 @@ class XmppNotificationService(BaseNotificationService):
def send_message(sender, password, recipient, message):
""" Send a message over XMPP. """
import sleekxmpp
class SendNotificationBot(sleekxmpp.ClientXMPP):
@ -78,4 +79,4 @@ def send_message(sender, password, recipient, message):
"""" Disconnect from the server if credentials are invalid. """
self.disconnect()
SendNotificationBot(sender, password, recipient, message)
SendNotificationBot()