From a5ee138d563f096002aadbd0e14b0eff767f5ff6 Mon Sep 17 00:00:00 2001 From: Quentame Date: Thu, 10 Oct 2019 18:52:19 +0200 Subject: [PATCH] Move imports in xmpp component (#27390) --- homeassistant/components/xmpp/notify.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/xmpp/notify.py b/homeassistant/components/xmpp/notify.py index 3719113f7c9..5aa9dbfffd1 100644 --- a/homeassistant/components/xmpp/notify.py +++ b/homeassistant/components/xmpp/notify.py @@ -7,6 +7,14 @@ import random import string import requests +import slixmpp +from slixmpp.exceptions import IqError, IqTimeout, XMPPError +from slixmpp.xmlstream.xmlstream import NotConnectedError +from slixmpp.plugins.xep_0363.http_upload import ( + FileTooBig, + FileUploadError, + UploadServiceNotFound, +) import voluptuous as vol from homeassistant.const import ( @@ -118,14 +126,6 @@ async def async_send_message( data=None, ): """Send a message over XMPP.""" - import slixmpp - from slixmpp.exceptions import IqError, IqTimeout, XMPPError - from slixmpp.xmlstream.xmlstream import NotConnectedError - from slixmpp.plugins.xep_0363.http_upload import ( - FileTooBig, - FileUploadError, - UploadServiceNotFound, - ) class SendNotificationBot(slixmpp.ClientXMPP): """Service for sending Jabber (XMPP) messages."""