moved imports to top level (#27695)

This commit is contained in:
bouni authored and Fabian Affolter committed 2019-10-15 17:56:04 +05:30
1 parent 40fbc3bd41
commit b22eb22358
1 file changed
+2 -2
+2 -2
View File
@@ -2,6 +2,8 @@
from datetime import timedelta
import logging
import aiodns
from aiodns.error import DNSError
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
@@ -58,7 +60,6 @@ class WanIpSensor(Entity):
def __init__(self, hass, name, hostname, resolver, ipv6):
"""Initialize the DNS IP sensor."""
import aiodns
self.hass = hass
self._name = name
@@ -80,7 +81,6 @@ class WanIpSensor(Entity):
async def async_update(self):
"""Get the current DNS IP address for hostname."""
from aiodns.error import DNSError
try:
response = await self.resolver.query(self.hostname, self.querytype)