Skip to content

Commit

Permalink
Extras: prefix warning and error titles with message type
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Nov 4, 2024
1 parent 5189b92 commit 0ffeed2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions klippy/ratos.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ def _interpret_output(data):
# Handle the parsed data
if data['result'] == 'error' and 'message' in data:
self.last_processed_file_result = None
self.console_echo(data['title'], 'alert', data['message'])
self.console_echo("Error: " + data['title'], 'alert', data['message'])
if data['result'] == 'warning' and 'message' in data:
self.console_echo(data['title'], 'warning', data['message'])
self.console_echo("Warning: " + data['title'], 'warning', data['message'])
if data['result'] == 'success':
self.last_processed_file_result = data['payload']
if 'wasAlreadyProcessed' in data['payload'] and data['payload']['wasAlreadyProcessed']:
Expand All @@ -280,7 +280,7 @@ def _interpret_output(data):
mins = (eta_secs % 3600) // 60
secs = eta_secs % 60
eta_str = f"{hours}h {mins}m {secs}s"
self.console_echo(f"Post-processing... {data['payload']['percentage']}% {eta_str} remaining", 'info')
self.console_echo(f"Post-processing ({data['payload']['percentage']}%)... {eta_str} remaining", 'info')

def _process_output(eventtime):
if process.stdout is None:
Expand Down

0 comments on commit 0ffeed2

Please sign in to comment.