From 452eda3d6de8ccac3f69bfcd70fb02f22e843534 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 30 Jan 2014 12:27:47 +0100 Subject: [PATCH] use unicode strings, fix failed status color --- notifico/services/hooks/jenkins.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/notifico/services/hooks/jenkins.py b/notifico/services/hooks/jenkins.py index 6958522f..8b445b1b 100644 --- a/notifico/services/hooks/jenkins.py +++ b/notifico/services/hooks/jenkins.py @@ -95,7 +95,7 @@ def _create_summary(cls, payload, omit_phase=False): status_colour = { 'SUCCESS': HookService.colors['GREEN'], 'UNSTABLE': HookService.colors['YELLOW'], - 'FAILURE': HookService.colors['RED'] + 'FAILED': HookService.colors['RED'] }.get( payload['build'].get('status', 'SUCCESS'), HookService.colors['RED'] @@ -110,7 +110,7 @@ def _create_summary(cls, payload, omit_phase=False): )) # Status - status = '' + status = u'' if 'status' in payload['build']: status = u'{status_colour}{message}{RESET}'.format( status_colour=status_colour, @@ -119,9 +119,9 @@ def _create_summary(cls, payload, omit_phase=False): ) # Current phase - phase = '' + phase = u'' if not omit_phase: - phase = '{status_colour}{message}{RESET}'.format( + phase = u'{status_colour}{message}{RESET}'.format( status_colour=status_colour, message=payload['build']['phase'].capitalize(), **HookService.colors