mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-13 10:54:33 +02:00
included librouteros library to avoid conflicts with other integrations #2
This commit is contained in:
parent
c58184b0f7
commit
b70bb9db92
9 changed files with 590 additions and 4 deletions
|
@ -2,8 +2,18 @@
|
|||
|
||||
import ssl
|
||||
import logging
|
||||
import librouteros
|
||||
import os
|
||||
import sys
|
||||
import importlib
|
||||
from .exceptions import OldLibrouteros, ApiEntryNotFound
|
||||
|
||||
MODULE_PATH = os.path.join(os.path.dirname(__file__), "librouteros", "__init__.py")
|
||||
MODULE_NAME = "librouteros"
|
||||
spec = importlib.util.spec_from_file_location(MODULE_NAME, MODULE_PATH)
|
||||
librouteros = importlib.util.module_from_spec(spec)
|
||||
sys.modules[spec.name] = librouteros
|
||||
spec.loader.exec_module(librouteros)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue