From 191aa8a0dc600553f16fa3aa07f4efc279f14a9e Mon Sep 17 00:00:00 2001 From: tanhengyeow Date: Sun, 15 Jul 2018 23:04:29 +0800 Subject: [PATCH] Refactor hipchat_notif.py Converted all relevant functions to use helpers. instead of a specific import. Added commas to last entries of mapping tuples. Change-Id: I87640188c900aef38ee368eca7540c3126274c2e --- jenkins_jobs/modules/hipchat_notif.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jenkins_jobs/modules/hipchat_notif.py b/jenkins_jobs/modules/hipchat_notif.py index c342a55ec..c315c30c4 100644 --- a/jenkins_jobs/modules/hipchat_notif.py +++ b/jenkins_jobs/modules/hipchat_notif.py @@ -82,7 +82,7 @@ from six.moves import configparser import jenkins_jobs.errors import jenkins_jobs.modules.base -from jenkins_jobs.modules.helpers import convert_mapping_to_xml +import jenkins_jobs.modules.helpers as helpers logger = logging.getLogger(__name__) @@ -175,8 +175,9 @@ class HipChat(jenkins_jobs.modules.base.Base): ('notify-not-built', 'notifyNotBuilt', False), ('notify-unstable', 'notifyUnstable', False), ('notify-failure', 'notifyFailure', False), - ('notify-back-to-normal', 'notifyBackToNormal', False)] - convert_mapping_to_xml(pdefhip, + ('notify-back-to-normal', 'notifyBackToNormal', False), + ] + helpers.convert_mapping_to_xml(pdefhip, hipchat, mapping, fail_required=True) publishers = xml_parent.find('publishers')