Renamed display to log

This commit is contained in:
Ace Pace 2020-04-12 19:58:20 +03:00
parent fcfbef995b
commit c00958ddcd
2 changed files with 7 additions and 7 deletions

View File

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

View File

@ -18,5 +18,5 @@ class SystemInfoTelem(BaseTelem):
def get_data(self):
return self.system_info
def send(self, display_data=False):
super(SystemInfoTelem, self).send(False)
def send(self, log_data=False):
super(SystemInfoTelem, self).send(log_data)