summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Options.py8
-rwxr-xr-xsrc/sbin/bcfg2-test1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Options.py b/src/lib/Bcfg2/Options.py
index a6511f88e..64408693a 100644
--- a/src/lib/Bcfg2/Options.py
+++ b/src/lib/Bcfg2/Options.py
@@ -334,6 +334,12 @@ def get_bool(val):
raise ValueError("Not a boolean value", val)
+def get_int(val):
+ """ given a string value of an integer configuration option,
+ return an actual int """
+ return int(val)
+
+
def get_timeout(val):
""" convert the timeout value into a float or None """
if val is None:
@@ -863,7 +869,7 @@ TEST_CHILDREN = \
cmd='--children',
odesc='<children>',
cf=('bcfg2_test', 'children'),
- cook=int,
+ cook=get_int,
long_arg=True)
TEST_XUNIT = \
Option('Output an XUnit result file with --children',
diff --git a/src/sbin/bcfg2-test b/src/sbin/bcfg2-test
index f13240879..2065825ec 100755
--- a/src/sbin/bcfg2-test
+++ b/src/sbin/bcfg2-test
@@ -136,6 +136,7 @@ class ClientTest(TestCase):
"Configuration contains unknown packages: %s" % \
", ".join(unknown_pkgs)
+ # check for render failures
failures = []
msg = output + ["Failures:"]
for failure in config.xpath('//*[@failure]'):