diff options
author | Maxim Devaev <[email protected]> | 2022-06-07 05:16:10 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-06-07 05:16:10 +0300 |
commit | 7296637e4d1c58e2a7b353e8b0ebb84f9e3b4f8f (patch) | |
tree | 618442dec0d0a1e25c039a1c3102320dce027d6a | |
parent | 591403549546919102e4e23ab3a6535dcc52c382 (diff) |
muted einval
-rw-r--r-- | kvmd/apps/watchdog/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kvmd/apps/watchdog/__init__.py b/kvmd/apps/watchdog/__init__.py index 953168cd..e7271ac1 100644 --- a/kvmd/apps/watchdog/__init__.py +++ b/kvmd/apps/watchdog/__init__.py @@ -57,7 +57,12 @@ def _write_int(rtc: int, key: str, value: int) -> None: def _reset_alarm(rtc: int, timeout: int) -> None: - now = _read_int(rtc, "since_epoch") + try: + now = _read_int(rtc, "since_epoch") + except OSError as err: + if err.errno != errno.EINVAL: + raise + raise RtcIsNotAvailableError("Can't read since_epoch right now") if now == 0: raise RtcIsNotAvailableError("Current UNIX time == 0") try: |