Merge pull request #614 from acepace/bugfix/leak_info_when_sending_telem

Brute force fix for #613
This commit is contained in:
Shay Nehmad 2020-04-13 16:13:15 +03:00 committed by GitHub
commit 9aaa84ee48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -17,12 +17,16 @@ class BaseTelem(object, metaclass=abc.ABCMeta):
def __init__(self): def __init__(self):
pass pass
def send(self): def send(self, log_data=True):
""" """
Sends telemetry to island Sends telemetry to island
""" """
data = self.get_data() data = self.get_data()
logger.debug("Sending {} telemetry. Data: {}".format(self.telem_category, json.dumps(data))) if log_data:
data_to_log = json.dumps(data)
else:
data_to_log = 'redacted'
logger.debug("Sending {} telemetry. Data: {}".format(self.telem_category, data_to_log))
ControlClient.send_telemetry(self.telem_category, data) ControlClient.send_telemetry(self.telem_category, data)
@property @property

View File

@ -17,3 +17,6 @@ class SystemInfoTelem(BaseTelem):
def get_data(self): def get_data(self):
return self.system_info return self.system_info
def send(self, log_data=False):
super(SystemInfoTelem, self).send(log_data)