diff options
author | Maxim Devaev <[email protected]> | 2022-05-24 16:12:24 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-05-24 16:12:24 +0300 |
commit | a3b0b047638bdeefb72781308d207fbf6fa848d4 (patch) | |
tree | 0761281c1f69542d64dd72cba31d165591b2b46a | |
parent | d722c3fff7387476afae96e0afb5f005ba39b37a (diff) |
log fix
-rw-r--r-- | kvmd/apps/otg/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py index bff089f8..9b6f5e69 100644 --- a/kvmd/apps/otg/__init__.py +++ b/kvmd/apps/otg/__init__.py @@ -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)) |