mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
minor 3.7 fixes
This commit is contained in:
parent
e106aaebed
commit
0c85248987
@ -177,6 +177,7 @@ async def run_region_task(
|
|||||||
|
|
||||||
if entered.done():
|
if entered.done():
|
||||||
return
|
return
|
||||||
|
|
||||||
exc = task.exception()
|
exc = task.exception()
|
||||||
if exc is not None:
|
if exc is not None:
|
||||||
raise exc
|
raise exc
|
||||||
|
|||||||
@ -64,8 +64,7 @@ async def check_request_auth(auth_manager: AuthManager, exposed: HttpExposed, re
|
|||||||
return
|
return
|
||||||
|
|
||||||
basic_auth = request.headers.get("Authorization", "")
|
basic_auth = request.headers.get("Authorization", "")
|
||||||
if basic_auth:
|
if basic_auth and basic_auth[:6].lower() == "basic ":
|
||||||
if basic_auth[:6].lower() == "basic ":
|
|
||||||
try:
|
try:
|
||||||
(user, passwd) = base64.b64decode(basic_auth[6:]).decode("utf-8").split(":")
|
(user, passwd) = base64.b64decode(basic_auth[6:]).decode("utf-8").split(":")
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
@ -216,7 +216,7 @@ class KvmdServer(HttpServer): # pylint: disable=too-many-arguments,too-many-ins
|
|||||||
("resolution", valid_stream_resolution, StreamerResolutionNotSupported),
|
("resolution", valid_stream_resolution, StreamerResolutionNotSupported),
|
||||||
]:
|
]:
|
||||||
value = request.query.get(name)
|
value = request.query.get(name)
|
||||||
if (value):
|
if value:
|
||||||
if name not in current_params:
|
if name not in current_params:
|
||||||
assert exc_cls is not None, name
|
assert exc_cls is not None, name
|
||||||
raise exc_cls()
|
raise exc_cls()
|
||||||
|
|||||||
@ -258,7 +258,9 @@ class UserGpio:
|
|||||||
"type": "label",
|
"type": "label",
|
||||||
"text": item[1:].strip(),
|
"text": item[1:].strip(),
|
||||||
})
|
})
|
||||||
elif (parts := list(map(str.strip, item.split(",", 1)))):
|
else:
|
||||||
|
parts = list(map(str.strip, item.split(",", 1)))
|
||||||
|
if parts:
|
||||||
if parts[0] in self.__inputs:
|
if parts[0] in self.__inputs:
|
||||||
items.append({
|
items.append({
|
||||||
"type": "input",
|
"type": "input",
|
||||||
|
|||||||
@ -130,8 +130,9 @@ def _read_keyboard_layout(path: str) -> Dict[int, At1Key]: # Keysym to evdev (a
|
|||||||
ctrl=("ctrl" in rest),
|
ctrl=("ctrl" in rest),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "addupper" in rest:
|
||||||
x11_code = _resolve_keysym(parts[0].upper())
|
x11_code = _resolve_keysym(parts[0].upper())
|
||||||
if "addupper" in rest and x11_code != 0:
|
if x11_code != 0:
|
||||||
layout[x11_code] = At1Key(
|
layout[x11_code] = At1Key(
|
||||||
code=at1_code,
|
code=at1_code,
|
||||||
shift=True,
|
shift=True,
|
||||||
|
|||||||
1
setup.py
1
setup.py
@ -134,6 +134,7 @@ def main() -> None:
|
|||||||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
"Topic :: System :: Systems Administration",
|
"Topic :: System :: Systems Administration",
|
||||||
"Operating System :: POSIX :: Linux",
|
"Operating System :: POSIX :: Linux",
|
||||||
"Intended Audience :: System Administrators",
|
"Intended Audience :: System Administrators",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user