diff options
author | Maxim Devaev <[email protected]> | 2023-03-07 23:54:05 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2023-03-07 23:54:05 +0200 |
commit | f652eca9c213dd783cf2ffd02109b2353ccb86c1 (patch) | |
tree | 3c2a5c68e0b03536ec5c482b9b5be708795e8292 /kvmd/apps/watchdog | |
parent | 002031baf15d328dad764a620e1c83c01e7a55a6 (diff) |
refactoring
Diffstat (limited to 'kvmd/apps/watchdog')
-rw-r--r-- | kvmd/apps/watchdog/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kvmd/apps/watchdog/__init__.py b/kvmd/apps/watchdog/__init__.py index c8a50729..0e7901b0 100644 --- a/kvmd/apps/watchdog/__init__.py +++ b/kvmd/apps/watchdog/__init__.py @@ -44,13 +44,13 @@ def _join_rtc(rtc: int, key: str) -> str: def _read_int(rtc: int, key: str) -> int: - with open(_join_rtc(rtc, key)) as value_file: - return int(value_file.read().strip() or "0") + with open(_join_rtc(rtc, key)) as file: + return int(file.read().strip() or "0") def _write_int(rtc: int, key: str, value: int) -> None: - with open(_join_rtc(rtc, key), "w") as value_file: - value_file.write(str(value)) + with open(_join_rtc(rtc, key), "w") as file: + file.write(str(value)) def _reset_alarm(rtc: int, timeout: int) -> None: |