From b644818eef7ea143ed00db651a463c3d424a6d79 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 23 Oct 2018 17:38:38 -0500 Subject: [PATCH] Don't mark client as online unless it's also enabled --- rattail_tempmon/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rattail_tempmon/client.py b/rattail_tempmon/client.py index ffcc721..9fde68a 100644 --- a/rattail_tempmon/client.py +++ b/rattail_tempmon/client.py @@ -91,11 +91,11 @@ class TempmonClient(Daemon): if client.enabled: for probe in client.enabled_probes(): self.take_reading(session, probe) - session.flush() + session.flush() - # one more thing, make sure our client appears "online" - if not client.online: - client.online = True + # one more thing, make sure our client appears "online" + if not client.online: + client.online = True except Exception as error: log_error = True