Move imports to top for nmap_tracker (#29364)

This commit is contained in:
springstan authored and Paulus Schoutsen committed 2019-12-03 15:46:38 -08:00
1 parent bc635120fa
commit 564c468c26
1 file changed
+4 -5
@@ -1,19 +1,20 @@
"""Support for scanning a network with nmap."""
import logging
from collections import namedtuple
from datetime import timedelta
import logging
from getmac import get_mac_address
from nmap import PortScanner, PortScannerError
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import CONF_HOSTS
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
_LOGGER = logging.getLogger(__name__)
@@ -91,8 +92,6 @@ class NmapDeviceScanner(DeviceScanner):
"""
_LOGGER.debug("Scanning...")
from nmap import PortScanner, PortScannerError
scanner = PortScanner()
options = self._options