Dropped _convert_report()

* This should be handled in wk.hw.diags and wk.hw.ddrescue
This commit is contained in:
2Shirt 2020-01-10 17:10:13 -07:00
parent b4e07a0d88
commit e438d3aec7
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -85,11 +85,6 @@ class osTicket(): # pylint: disable=invalid-name
LOG.error('Failed to connect to osTicket database')
raise RuntimeError('Failed to connect to osTicket database')
def _convert_report(self, name, report):
"""Convert report into an osTicket friendly format, returns list."""
out_report = []
#TODO: Convert report
def _disconnect(self):
"""Close osTicket connection."""
for db_obj in (self.db_cursor, self.db_connection):
@ -270,7 +265,7 @@ class osTicket(): # pylint: disable=invalid-name
def set_cpu_max_temp(self, temp):
"""Set CPU max temp in osTicket for ticket_id."""
LOG.info(f'Setting max CPU temp to {temp}')
LOG.info('Setting max CPU temp to %s', temp)
self._connect()
# Bail if disabled
@ -285,7 +280,7 @@ class osTicket(): # pylint: disable=invalid-name
def set_flag_failed(self, flag_name):
"""Set flag as failed in osTicket for ticket_id."""
LOG.warning(f'Setting osTicket {flag_name} checkbox to FAILED')
LOG.warning('Setting osTicket %s checkbox to FAILED', flag_name)
real_flag_name = FLAG_CPU if flag_name == 'CPU' else FLAG_DISK
self._connect()
@ -319,7 +314,7 @@ class osTicket(): # pylint: disable=invalid-name
return
# Current value != to FAILED, updating checkbox
LOG.info(f'Setting osTicket {flag_name} checkbox to PASSED')
LOG.info('Setting osTicket %s checkbox to PASSED', flag_name)
self._set_flag(real_flag_name, FLAG_CODES['Pass'])
# Done