Move fortigate imports at top-level (#29093)

pull/29113/head^2
Quentame 2019-11-26 19:09:52 +01:00 committed by Paulus Schoutsen
parent 915d23158d
commit 274508f8fd
1 changed files with 2 additions and 3 deletions

View File

@ -1,12 +1,13 @@
"""Fortigate integration."""
import logging
from pyFGT.fortigate import FGTConnectionError, FortiGate
import voluptuous as vol
from homeassistant.const import (
CONF_API_KEY,
CONF_DEVICES,
CONF_HOST,
CONF_API_KEY,
CONF_USERNAME,
EVENT_HOMEASSISTANT_STOP,
)
@ -52,8 +53,6 @@ async def async_setup(hass, config):
async def async_setup_fortigate(hass, config, host, user, api_key, devices):
"""Start up the Fortigate component platforms."""
from pyFGT.fortigate import FGTConnectionError, FortiGate
fgt = FortiGate(host, user, apikey=api_key, disable_request_warnings=True)
try: