From 6209d61b4846bca1b438c22566728b5b29c3cd4b Mon Sep 17 00:00:00 2001 From: jbruce Date: Wed, 6 Jul 2022 07:43:59 -0400 Subject: [PATCH] wrap log statement in try --- watcher.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/watcher.py b/watcher.py index 323e2fa..513ca85 100755 --- a/watcher.py +++ b/watcher.py @@ -61,7 +61,10 @@ class Watcher(object): if self.has_errors(): self.bad_checks = self.bad_checks + 1 else: - log.info("OK temp=%0.2f target=%0.2f error=%0.2f" % (self.stats['ispoint'],self.stats['setpoint'],self.stats['err'])) + try: + log.info("OK temp=%0.2f target=%0.2f error=%0.2f" % (self.stats['ispoint'],self.stats['setpoint'],self.stats['err'])) + except: + pass if self.bad_checks >= self.bad_check_limit: msg = "error kiln needs help. %s" % json.dumps(self.stats,indent=2, sort_keys=True)