diff --git a/providers/base/bin/watchdog_config_test.py b/providers/base/bin/watchdog_config_test.py index b78b3bca2..6e7fad8e3 100755 --- a/providers/base/bin/watchdog_config_test.py +++ b/providers/base/bin/watchdog_config_test.py @@ -116,9 +116,9 @@ def main(): print("watchdog.service unit does not report as active") watchdog_config_ready = False if watchdog_config_ready: - print("watchdog.service active") + print("watchdog.service is active") - raise SystemExit(not watchdog_config_ready) + return not watchdog_config_ready if __name__ == "__main__": diff --git a/providers/base/tests/watchdog_config_test.py b/providers/base/tests/watchdog_config_test.py index 66c6ac246..6e7fad8e3 100755 --- a/providers/base/tests/watchdog_config_test.py +++ b/providers/base/tests/watchdog_config_test.py @@ -29,7 +29,6 @@ from checkbox_support.snap_utils.system import on_ubuntucore from checkbox_support.snap_utils.system import get_series -from yaml import parse def watchdog_argparse(): @@ -96,8 +95,8 @@ def main(): else: if is_systemd_wdt_configured: print( - "systemd watchdog should not be enabled but reset timeout: " - "{}".format(runtime_watchdog_usec) + "systemd watchdog should not be enabled but " + "reset timeout: {}".format(runtime_watchdog_usec) ) watchdog_config_ready = False if watchdog_config_ready: @@ -117,9 +116,9 @@ def main(): print("watchdog.service unit does not report as active") watchdog_config_ready = False if watchdog_config_ready: - print("watchdog.service active") + print("watchdog.service is active") - raise SystemExit(not watchdog_config_ready) + return not watchdog_config_ready if __name__ == "__main__":