From eee05f8e281ec3d5490b26a5a783d3776d140a4d Mon Sep 17 00:00:00 2001 From: Natan Keddem Date: Sat, 4 Nov 2023 00:00:28 -0400 Subject: [PATCH] cleanup prints --- snapper/interfaces/cli.py | 2 +- snapper/tabs/automation.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snapper/interfaces/cli.py b/snapper/interfaces/cli.py index caca365..5eeb43d 100644 --- a/snapper/interfaces/cli.py +++ b/snapper/interfaces/cli.py @@ -79,7 +79,7 @@ class Cli: with contextlib.suppress(asyncio.TimeoutError): await asyncio.wait_for(process.wait(), 0.1) except Exception as e: - print(e) + logger.exception(e) def terminate(self) -> None: self._terminate.set() diff --git a/snapper/tabs/automation.py b/snapper/tabs/automation.py index 6b58aad..4c0cb58 100644 --- a/snapper/tabs/automation.py +++ b/snapper/tabs/automation.py @@ -37,7 +37,7 @@ async def automation_job(**kwargs) -> None: tab.host = d.hosts[0] tab.add_history(result=result) else: - print("JOB SKIPPED!") + logger.warning("Job Skipped!") elif jd["app"] == "zfs_autobackup": d = scheduler.Zfs_Autobackup(**jd) if d.id not in job_handlers: @@ -47,7 +47,7 @@ async def automation_job(**kwargs) -> None: tab.host = d.hosts[0] tab.add_history(result=result) else: - print("JOB SKIPPED!") + logger.warning("Job Skipped!") class Automation(Tab):