summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2010-11-10 15:09:52 -0500
committerBill Peck <bpeck@redhat.com>2010-11-10 15:09:52 -0500
commitc6b3cbec14ade69b49945620299cebd16e7efcba (patch)
treefe6af2a1bc5115b346a1ba541b69afd2d07c98f0
parent7f551ac1b980c744624980300c5d5aa174751810 (diff)
change boolean value to lowercase. only false,true,0 and 1 are valid.beaker-distribution-reservesys-2_0-46
-rw-r--r--Server/bkr/server/jobxml.py5
-rw-r--r--Server/bkr/server/model.py2
2 files changed, 3 insertions, 4 deletions
diff --git a/Server/bkr/server/jobxml.py b/Server/bkr/server/jobxml.py
index dfcdac0..d1936c5 100644
--- a/Server/bkr/server/jobxml.py
+++ b/Server/bkr/server/jobxml.py
@@ -236,14 +236,13 @@ class XmlTask(ElementWrapper):
class XmlAutoPick(ElementWrapper):
- is_false = ('FALSE','0') #These need to be matched to the rng
- is_true = ('TRUE','1')
+ is_true = ('true','1')
def __getattr__(self, attrname):
if attrname == 'random':
unicode_val = self.get_xml_attr('random', unicode, False)
# The order here is important, as it determines default behaviour
# At the moment this means it defauls to FALSE
- if unicode_val in self.is_true:
+ if unicode_val.lower() in self.is_true:
return True
else:
return False
diff --git a/Server/bkr/server/model.py b/Server/bkr/server/model.py
index 2d454ef..32ec7d3 100644
--- a/Server/bkr/server/model.py
+++ b/Server/bkr/server/model.py
@@ -4078,7 +4078,7 @@ class Recipe(TaskBase):
recipe.setAttribute("job_id", "%s" % self.recipeset.job_id)
recipe.setAttribute("recipe_set_id", "%s" % self.recipe_set_id)
autopick = self.doc.createElement("autopick")
- autopick.setAttribute("random", "%s" % unicode(self.autopick_random).upper())
+ autopick.setAttribute("random", "%s" % unicode(self.autopick_random).lower())
recipe.appendChild(autopick)
recipe.setAttribute("whiteboard", "%s" % self.whiteboard and self.whiteboard or '')
recipe.setAttribute("role", "%s" % self.role and self.role or 'RECIPE_MEMBERS')