Merge "Refactor hipchat_notif.py"

This commit is contained in:
Zuul 2018-07-17 16:59:07 +00:00 committed by Gerrit Code Review
commit ba9aeca0ab
1 changed files with 4 additions and 3 deletions

View File

@ -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')