Support hacking module <= 0.10.1
Update version restrictions to allow hacking module <= 0.10.1 and fix any style errors reported by the latest version. Change-Id: Ia608096342b11e411e56a86e8f289f9891077895
This commit is contained in:
parent
9cbba31054
commit
0c012a93c4
|
@ -158,7 +158,7 @@ def setup_config_settings(options):
|
|||
if os.path.isfile(localconf):
|
||||
conf = localconf
|
||||
config = configparser.ConfigParser()
|
||||
## Load default config always
|
||||
# Load default config always
|
||||
config.readfp(StringIO(DEFAULT_CONF))
|
||||
if os.path.isfile(conf):
|
||||
logger.debug("Reading config from {0}".format(conf))
|
||||
|
|
|
@ -938,7 +938,7 @@ def conditional_step(parser, xml_parent, data):
|
|||
|
||||
br = XML.SubElement(ctag, 'bestResult')
|
||||
br_name = cdata['condition-best']
|
||||
if not br_name in hudson_model.THRESHOLDS:
|
||||
if br_name not in hudson_model.THRESHOLDS:
|
||||
raise JenkinsJobsException(
|
||||
"threshold must be one of %s" %
|
||||
", ".join(hudson_model.THRESHOLDS.keys()))
|
||||
|
|
|
@ -261,8 +261,8 @@ def trigger_parameterized_builds(parser, xml_parent, data):
|
|||
'matrix.MatrixSubsetBuildParameters')
|
||||
XML.SubElement(subset, 'filter').text = \
|
||||
project_def['restrict-matrix-project']
|
||||
if 'node-label-name' in project_def or \
|
||||
'node-label' in project_def:
|
||||
if ('node-label-name' in project_def or
|
||||
'node-label' in project_def):
|
||||
params = XML.SubElement(tconfigs,
|
||||
'org.jvnet.jenkins.plugins.'
|
||||
'nodelabelparameter.'
|
||||
|
@ -1041,8 +1041,7 @@ def violations(parser, xml_parent, data):
|
|||
configs = XML.SubElement(config, 'typeConfigs')
|
||||
XML.SubElement(configs, 'no-comparator')
|
||||
|
||||
for name in [
|
||||
'checkstyle',
|
||||
for name in ['checkstyle',
|
||||
'codenarc',
|
||||
'cpd',
|
||||
'cpplint',
|
||||
|
@ -1496,7 +1495,7 @@ def email_ext(parser, xml_parent, data):
|
|||
'only-configurations': 'ONLY_CONFIGURATIONS',
|
||||
'only-parent': 'ONLY_PARENT'}
|
||||
matrix_trigger = data.get('matrix-trigger', None)
|
||||
## If none defined, then do not create entry
|
||||
# If none defined, then do not create entry
|
||||
if matrix_trigger is not None:
|
||||
if matrix_trigger not in matrix_dict:
|
||||
raise JenkinsJobsException("matrix-trigger entered is not valid, "
|
||||
|
@ -4148,7 +4147,7 @@ def conditional_publisher(parser, xml_parent, data):
|
|||
|
||||
br = XML.SubElement(ctag, 'bestResult')
|
||||
br_name = cdata['condition-best']
|
||||
if not br_name in hudson_model.THRESHOLDS:
|
||||
if br_name not in hudson_model.THRESHOLDS:
|
||||
raise JenkinsJobsException(
|
||||
"threshold must be one of %s" %
|
||||
", ".join(hudson_model.THRESHOLDS.keys()))
|
||||
|
|
|
@ -689,7 +689,8 @@ def tfs(parser, xml_parent, data):
|
|||
|
||||
"""
|
||||
|
||||
tfs = XML.SubElement(xml_parent, 'scm', {'class': 'hudson.plugins.tfs.'
|
||||
tfs = XML.SubElement(xml_parent, 'scm',
|
||||
{'class': 'hudson.plugins.tfs.'
|
||||
'TeamFoundationServerScm'})
|
||||
XML.SubElement(tfs, 'serverUrl').text = str(
|
||||
data.get('server-url', ''))
|
||||
|
@ -709,8 +710,8 @@ def tfs(parser, xml_parent, data):
|
|||
data.get('use-update', True))
|
||||
store = data.get('web-access', None)
|
||||
if 'web-access' in data and isinstance(store, list):
|
||||
web = XML.SubElement(tfs, 'repositoryBrowser', {'class': 'hudson.'
|
||||
'plugins.tfs.browsers.'
|
||||
web = XML.SubElement(tfs, 'repositoryBrowser',
|
||||
{'class': 'hudson.plugins.tfs.browsers.'
|
||||
'TeamSystemWebAccessBrowser'})
|
||||
XML.SubElement(web, 'url').text = str(store[0].get('web-url', None))
|
||||
elif 'web-access' in data and store is None:
|
||||
|
@ -848,8 +849,8 @@ def hg(self, xml_parent, data):
|
|||
raise JenkinsJobsException("Browser entered is not valid must be one "
|
||||
"of: %s" % ", ".join(browserdict.keys()))
|
||||
if browser != 'auto':
|
||||
bc = XML.SubElement(scm, 'browser', {'class':
|
||||
'hudson.plugins.mercurial.browser.' +
|
||||
bc = XML.SubElement(scm, 'browser',
|
||||
{'class': 'hudson.plugins.mercurial.browser.' +
|
||||
browserdict[browser]})
|
||||
if 'browser-url' in data:
|
||||
XML.SubElement(bc, 'url').text = data['browser-url']
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hacking>=0.5.6,<0.8
|
||||
hacking>=0.5.6,<=10.1
|
||||
coverage>=3.6
|
||||
discover
|
||||
fixtures
|
||||
|
|
Loading…
Reference in New Issue