mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
log fix
This commit is contained in:
parent
d722c3fff7
commit
a3b0b04763
@ -79,10 +79,11 @@ def _unlink(path: str, optional: bool=False) -> None:
|
||||
|
||||
|
||||
def _write(path: str, value: Union[str, int], optional: bool=False) -> None:
|
||||
get_logger().info("WRITE --- %s", path)
|
||||
logger = get_logger()
|
||||
if optional and not os.access(path, os.F_OK):
|
||||
get_logger().info("SKIP ---- %s", path)
|
||||
logger.info("WRITE --- [SKIPPED] %s", path)
|
||||
return
|
||||
logger.info("WRITE --- %s", path)
|
||||
with open(path, "w") as param_file:
|
||||
param_file.write(str(value))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user