Skip to content

Commit

Permalink
Merge pull request #52 from Dav1dde/jenkins2
Browse files Browse the repository at this point in the history
use unicode strings, fix failed status color
  • Loading branch information
TkTech committed Jan 30, 2014
2 parents c649ae4 + 452eda3 commit 4d40e8e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions notifico/services/hooks/jenkins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 4d40e8e

Please sign in to comment.