mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Move imports to top for nmap_tracker (#29364)
This commit is contained in:
parent
bc635120fa
commit
564c468c26
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user