summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-11-12 21:48:46 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-11-13 00:00:25 +0100
commit4d6d6e446c030bb6cf3f27ba257e713ac6701b7a (patch)
tree45533e3a9fcf00b13524c245e03e2eb21611f9c5 /source4/scripting/python
parent3b01dd5f59841b11e9906b8c23345946e0d0ea8c (diff)
downloadsamba-4d6d6e446c030bb6cf3f27ba257e713ac6701b7a.tar.gz
samba-4d6d6e446c030bb6cf3f27ba257e713ac6701b7a.tar.bz2
samba-4d6d6e446c030bb6cf3f27ba257e713ac6701b7a.zip
selftest: Avoid returning errors (rather than failures) in gpo test
This should help find the real cause of the flakey test, if it ever returns. Andrew Bartlett Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/tests/samba_tool/gpo.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/tests/samba_tool/gpo.py b/source4/scripting/python/samba/tests/samba_tool/gpo.py
index 84154f5756..c2e069d2b6 100644
--- a/source4/scripting/python/samba/tests/samba_tool/gpo.py
+++ b/source4/scripting/python/samba/tests/samba_tool/gpo.py
@@ -46,9 +46,11 @@ os.environ["SERVER"])
"""set up a temporary GPO to work with"""
super(GpoCmdTestCase, self).setUp()
(result, out, err) = self.runsubcmd("gpo", "create", self.gpo_name, "-H", "ldap://%s" % os.environ["SERVER"], "-U%s%%%s" % (os.environ["USERNAME"], os.environ["PASSWORD"]))
- self.gpo_guid = "{%s}" % out.split("{")[1].split("}")[0]
-
self.assertCmdSuccess(result, "Ensuring gpo created successfully")
+ try:
+ self.gpo_guid = "{%s}" % out.split("{")[1].split("}")[0]
+ except IndexError:
+ self.fail("Failed to find GUID in output: %s" % out)
def tearDown(self):
"""remove the temporary GPO to work with"""