diff options
author | Devaev Maxim <[email protected]> | 2020-09-30 14:12:09 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-30 14:12:09 +0300 |
commit | 16946d1e0f434a5f479d72cec2ab2ed2a7590538 (patch) | |
tree | 8f44c277be62bfb688b87cd92bf5f55ff8761f40 | |
parent | eeedb6025a4ede0d301b0b5356d13d14290e11b1 (diff) |
refactoring
-rw-r--r-- | kvmd/apps/kvmd/api/atx.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/api/export.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/api/hid.py | 4 | ||||
-rw-r--r-- | kvmd/apps/kvmd/api/log.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/api/msd.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/api/streamer.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/api/ugpio.py | 1 | ||||
-rw-r--r-- | kvmd/apps/kvmd/http.py | 22 | ||||
-rw-r--r-- | kvmd/apps/kvmd/server.py | 2 | ||||
-rw-r--r-- | kvmd/apps/otgmsd/__init__.py | 1 | ||||
-rw-r--r-- | kvmd/helpers/__init__.py | 20 | ||||
-rw-r--r-- | kvmd/helpers/otgmsd/__init__.py | 20 | ||||
-rw-r--r-- | kvmd/plugins/atx/gpio.py | 1 | ||||
-rw-r--r-- | kvmd/plugins/hid/otg/__init__.py | 1 | ||||
-rw-r--r-- | kvmd/plugins/hid/serial.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/msd/relay.py | 2 | ||||
-rw-r--r-- | kvmd/plugins/ugpio/hidrelay.py | 1 | ||||
-rw-r--r-- | kvmd/validators/kvm.py | 1 |
18 files changed, 62 insertions, 21 deletions
diff --git a/kvmd/apps/kvmd/api/atx.py b/kvmd/apps/kvmd/api/atx.py index bc669b2b..2d63ef3d 100644 --- a/kvmd/apps/kvmd/api/atx.py +++ b/kvmd/apps/kvmd/api/atx.py @@ -26,7 +26,6 @@ from aiohttp.web import Response from ....plugins.atx import BaseAtx from ....validators.basic import valid_bool - from ....validators.kvm import valid_atx_power_action from ....validators.kvm import valid_atx_button diff --git a/kvmd/apps/kvmd/api/export.py b/kvmd/apps/kvmd/api/export.py index 7b911828..8f9ee581 100644 --- a/kvmd/apps/kvmd/api/export.py +++ b/kvmd/apps/kvmd/api/export.py @@ -31,7 +31,6 @@ from aiohttp.web import Response from .... import tools from ....plugins.atx import BaseAtx - from ....plugins.ugpio import UserGpioModes from ..info import InfoManager diff --git a/kvmd/apps/kvmd/api/hid.py b/kvmd/apps/kvmd/api/hid.py index 6b31a38a..90bf53ff 100644 --- a/kvmd/apps/kvmd/api/hid.py +++ b/kvmd/apps/kvmd/api/hid.py @@ -34,12 +34,9 @@ from aiohttp.web import WebSocketResponse from ....plugins.hid import BaseHid from ....validators import raise_error - from ....validators.basic import valid_bool from ....validators.basic import valid_int_f0 - from ....validators.os import valid_printable_filename - from ....validators.kvm import valid_hid_key from ....validators.kvm import valid_hid_mouse_move from ....validators.kvm import valid_hid_mouse_button @@ -47,7 +44,6 @@ from ....validators.kvm import valid_hid_mouse_wheel from ....keyboard.keysym import SymmapWebKey from ....keyboard.keysym import build_symmap - from ....keyboard.printer import text_to_web_keys from ..http import exposed_http diff --git a/kvmd/apps/kvmd/api/log.py b/kvmd/apps/kvmd/api/log.py index 7dec92a3..744a3332 100644 --- a/kvmd/apps/kvmd/api/log.py +++ b/kvmd/apps/kvmd/api/log.py @@ -24,7 +24,6 @@ from aiohttp.web import Request from aiohttp.web import StreamResponse from ....validators.basic import valid_bool - from ....validators.kvm import valid_log_seek from ..logreader import LogReader diff --git a/kvmd/apps/kvmd/api/msd.py b/kvmd/apps/kvmd/api/msd.py index c41f651d..04fdd8b2 100644 --- a/kvmd/apps/kvmd/api/msd.py +++ b/kvmd/apps/kvmd/api/msd.py @@ -28,7 +28,6 @@ from ....logging import get_logger from ....plugins.msd import BaseMsd from ....validators.basic import valid_bool - from ....validators.kvm import valid_msd_image_name from ..http import exposed_http diff --git a/kvmd/apps/kvmd/api/streamer.py b/kvmd/apps/kvmd/api/streamer.py index cd5f045d..b47902fc 100644 --- a/kvmd/apps/kvmd/api/streamer.py +++ b/kvmd/apps/kvmd/api/streamer.py @@ -30,7 +30,6 @@ from PIL import Image from ....validators.basic import valid_bool from ....validators.basic import valid_int_f0 - from ....validators.kvm import valid_stream_quality from .... import aiotools diff --git a/kvmd/apps/kvmd/api/ugpio.py b/kvmd/apps/kvmd/api/ugpio.py index 48b60ab1..f98cbc58 100644 --- a/kvmd/apps/kvmd/api/ugpio.py +++ b/kvmd/apps/kvmd/api/ugpio.py @@ -25,7 +25,6 @@ from aiohttp.web import Response from ....validators.basic import valid_bool from ....validators.basic import valid_float_f0 - from ....validators.kvm import valid_ugpio_channel from ..ugpio import UserGpio diff --git a/kvmd/apps/kvmd/http.py b/kvmd/apps/kvmd/http.py index 21077af9..dc56d7e6 100644 --- a/kvmd/apps/kvmd/http.py +++ b/kvmd/apps/kvmd/http.py @@ -1,3 +1,25 @@ +# ========================================================================== # +# # +# KVMD - The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # + + import os import socket import dataclasses diff --git a/kvmd/apps/kvmd/server.py b/kvmd/apps/kvmd/server.py index 0ff4c49d..fee4b30a 100644 --- a/kvmd/apps/kvmd/server.py +++ b/kvmd/apps/kvmd/server.py @@ -51,9 +51,7 @@ from ...plugins.atx import BaseAtx from ...plugins.msd import BaseMsd from ...validators import ValidatorError - from ...validators.basic import valid_bool - from ...validators.kvm import valid_stream_quality from ...validators.kvm import valid_stream_fps from ...validators.kvm import valid_stream_resolution diff --git a/kvmd/apps/otgmsd/__init__.py b/kvmd/apps/otgmsd/__init__.py index a9891f0e..9b7bd477 100644 --- a/kvmd/apps/otgmsd/__init__.py +++ b/kvmd/apps/otgmsd/__init__.py @@ -32,7 +32,6 @@ import psutil from ...validators.basic import valid_bool from ...validators.basic import valid_int_f0 - from ...validators.os import valid_abs_file from .. import init diff --git a/kvmd/helpers/__init__.py b/kvmd/helpers/__init__.py index e69de29b..1e91f7fa 100644 --- a/kvmd/helpers/__init__.py +++ b/kvmd/helpers/__init__.py @@ -0,0 +1,20 @@ +# ========================================================================== # +# # +# KVMD - The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # diff --git a/kvmd/helpers/otgmsd/__init__.py b/kvmd/helpers/otgmsd/__init__.py index e69de29b..1e91f7fa 100644 --- a/kvmd/helpers/otgmsd/__init__.py +++ b/kvmd/helpers/otgmsd/__init__.py @@ -0,0 +1,20 @@ +# ========================================================================== # +# # +# KVMD - The main Pi-KVM daemon. # +# # +# Copyright (C) 2018 Maxim Devaev <[email protected]> # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see <https://www.gnu.org/licenses/>. # +# # +# ========================================================================== # diff --git a/kvmd/plugins/atx/gpio.py b/kvmd/plugins/atx/gpio.py index d26f28a7..52a52151 100644 --- a/kvmd/plugins/atx/gpio.py +++ b/kvmd/plugins/atx/gpio.py @@ -36,7 +36,6 @@ from ...yamlconf import Option from ...validators.basic import valid_bool from ...validators.basic import valid_float_f0 from ...validators.basic import valid_float_f01 - from ...validators.hw import valid_gpio_pin from . import AtxIsBusyError diff --git a/kvmd/plugins/hid/otg/__init__.py b/kvmd/plugins/hid/otg/__init__.py index b9c2c5b8..adbabfb9 100644 --- a/kvmd/plugins/hid/otg/__init__.py +++ b/kvmd/plugins/hid/otg/__init__.py @@ -33,7 +33,6 @@ from ....yamlconf import Option from ....validators.basic import valid_bool from ....validators.basic import valid_int_f1 from ....validators.basic import valid_float_f01 - from ....validators.os import valid_abs_path from .. import BaseHid diff --git a/kvmd/plugins/hid/serial.py b/kvmd/plugins/hid/serial.py index 594bf4ef..c7c1164d 100644 --- a/kvmd/plugins/hid/serial.py +++ b/kvmd/plugins/hid/serial.py @@ -54,9 +54,7 @@ from ...validators.basic import valid_bool from ...validators.basic import valid_int_f0 from ...validators.basic import valid_int_f1 from ...validators.basic import valid_float_f01 - from ...validators.os import valid_abs_path - from ...validators.hw import valid_tty_speed from ...validators.hw import valid_gpio_pin_optional diff --git a/kvmd/plugins/msd/relay.py b/kvmd/plugins/msd/relay.py index f4ecc6ab..d1d91841 100644 --- a/kvmd/plugins/msd/relay.py +++ b/kvmd/plugins/msd/relay.py @@ -47,9 +47,7 @@ from ...yamlconf import Option from ...validators.basic import valid_int_f1 from ...validators.basic import valid_float_f01 - from ...validators.os import valid_abs_path - from ...validators.hw import valid_gpio_pin from . import MsdError diff --git a/kvmd/plugins/ugpio/hidrelay.py b/kvmd/plugins/ugpio/hidrelay.py index 32c4a3eb..4341e6ac 100644 --- a/kvmd/plugins/ugpio/hidrelay.py +++ b/kvmd/plugins/ugpio/hidrelay.py @@ -36,7 +36,6 @@ from ... import aiotools from ...yamlconf import Option from ...validators.basic import valid_float_f01 - from ...validators.os import valid_abs_path from . import GpioDriverOfflineError diff --git a/kvmd/validators/kvm.py b/kvmd/validators/kvm.py index 676d5539..f89b1b8a 100644 --- a/kvmd/validators/kvm.py +++ b/kvmd/validators/kvm.py @@ -35,7 +35,6 @@ from . import check_len from .basic import valid_stripped_string_not_empty from .basic import valid_number from .basic import valid_string_list - from .os import valid_printable_filename |