Setting throttle values to default to 0 (instead of None)

Change-Id: I3d7b24f96efe3b588a727789c4900b9448da891d
This commit is contained in:
Manuel Desbonnet 2012-09-12 14:44:22 +01:00
parent 0a00226c0d
commit 084f9e5c86
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ def throttle(parser, xml_parent, data):
throttle = XML.SubElement(xml_parent,
'hudson.plugins.throttleconcurrents.ThrottleJobProperty')
XML.SubElement(throttle, 'maxConcurrentPerNode').text = str(
data.get('max-per-node'))
data.get('max-per-node', '0'))
XML.SubElement(throttle, 'maxConcurrentTotal').text = str(
data.get('max-total'))
data.get('max-total', '0'))
# TODO: What's "categories"?
#XML.SubElement(throttle, 'categories')
if data.get('enabled', True):