From c522cd73ac29c0bc2551e679284da71d46f533e1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Nov 2010 14:16:18 +1100 Subject: [PATCH] s4-repl_schema: fixed ldb exception handling --- source4/torture/drs/python/repl_schema.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/torture/drs/python/repl_schema.py b/source4/torture/drs/python/repl_schema.py index 1d94b0fdec5..55e653b8248 100644 --- a/source4/torture/drs/python/repl_schema.py +++ b/source4/torture/drs/python/repl_schema.py @@ -164,8 +164,10 @@ class DrsReplSchemaTestCase(samba.tests.TestCase): res_dc2 = self.ldb_dc2.search(base=obj_dn, scope=SCOPE_BASE, attrs=["*"]) - except LdbError, (ERR_NO_SUCH_OBJECT, _): - self.fail("%s doesn't exists on %s" % (obj_dn, self.dnsname_dc2)) + except LdbError, (enum, estr): + if enum == ERR_NO_SUCH_OBJECT: + self.fail("%s doesn't exists on %s" % (obj_dn, self.dnsname_dc2)) + raise self.assertEquals(len(res_dc2), 1, "%s doesn't exists on %s" % (obj_dn, self.dnsname_dc2)) -- 2.34.1