mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
取消中文日志
中文日志没有必要,减低代码耦合
This commit is contained in:
parent
3ec872878e
commit
baa0f7e226
@ -2,10 +2,6 @@ kvmd:
|
|||||||
auth:
|
auth:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
server:
|
|
||||||
unix_mode: 0666
|
|
||||||
access_log_format: '[%P / %{X-Real-IP}i] ''%r'' => 响应:%s;大小:%b;来源:''%{Referer}i'';用户代理:''%{User-Agent}i'''
|
|
||||||
|
|
||||||
atx:
|
atx:
|
||||||
type: disabled
|
type: disabled
|
||||||
|
|
||||||
@ -161,9 +157,4 @@ nginx:
|
|||||||
http:
|
http:
|
||||||
port: 8080
|
port: 8080
|
||||||
https:
|
https:
|
||||||
port: 4430
|
port: 4430
|
||||||
|
|
||||||
|
|
||||||
languages:
|
|
||||||
console: zh
|
|
||||||
web: zh
|
|
||||||
@ -30,17 +30,12 @@ from xmlrpc.client import ServerProxy
|
|||||||
|
|
||||||
from ...logging import get_logger
|
from ...logging import get_logger
|
||||||
|
|
||||||
|
us_systemd_journal = True
|
||||||
try:
|
try:
|
||||||
import systemd.journal
|
import systemd.journal
|
||||||
except ImportError as e:
|
except ImportError:
|
||||||
get_logger(0).error("Failed to import module: %s", "systemd.journal")
|
|
||||||
us_systemd_journal = False
|
|
||||||
|
|
||||||
try:
|
|
||||||
import supervisor.xmlrpc
|
import supervisor.xmlrpc
|
||||||
except ImportError as e:
|
us_systemd_journal = False
|
||||||
get_logger(0).info("Failed to import module: %s", "supervisor.xmlrpc")
|
|
||||||
us_systemd_journal = True
|
|
||||||
|
|
||||||
|
|
||||||
# =====
|
# =====
|
||||||
|
|||||||
@ -136,8 +136,6 @@ class _GpioOutput: # pylint: disable=too-many-instance-attributes
|
|||||||
|
|
||||||
self.__region = aiotools.AioExclusiveRegion(GpioChannelIsBusyError, notifier)
|
self.__region = aiotools.AioExclusiveRegion(GpioChannelIsBusyError, notifier)
|
||||||
|
|
||||||
self.gettext=Languages().gettext
|
|
||||||
|
|
||||||
def is_const(self) -> bool:
|
def is_const(self) -> bool:
|
||||||
return (not self.__switch and not self.__pulse_delay)
|
return (not self.__switch and not self.__pulse_delay)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user