From 5a1eb23b0a042664f3ac585e9fc2bd202eb73536 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 21 Oct 2023 11:59:18 +0200 Subject: [PATCH] Fixed return on non-init --- sbapp/sideband/core.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sbapp/sideband/core.py b/sbapp/sideband/core.py index f33cb0d..df46627 100644 --- a/sbapp/sideband/core.py +++ b/sbapp/sideband/core.py @@ -1586,13 +1586,19 @@ class SidebandCore(): self.telemeter.disable(sensor) def get_telemetry(self): - self.update_telemeter_config() - return self.telemeter.read_all() + if self.config["telemetry_enabled"] == True: + self.update_telemeter_config() + return self.telemeter.read_all() + else: + return {} def get_packed_telemetry(self): - self.update_telemeter_config() - packed = self.telemeter.packed() - return packed + if self.config["telemetry_enabled"] == True: + self.update_telemeter_config() + packed = self.telemeter.packed() + return packed + else: + return None def is_known(self, dest_hash): try: