diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-29 14:16:18 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-29 18:04:42 +1100 |
commit | c522cd73ac29c0bc2551e679284da71d46f533e1 (patch) | |
tree | 51de01977ce6a6a2f8b1425ecc4a1b5e5884074f /source4/torture | |
parent | 37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6 (diff) | |
download | samba-c522cd73ac29c0bc2551e679284da71d46f533e1.tar.gz samba-c522cd73ac29c0bc2551e679284da71d46f533e1.tar.bz2 samba-c522cd73ac29c0bc2551e679284da71d46f533e1.zip |
s4-repl_schema: fixed ldb exception handling
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/drs/python/repl_schema.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/torture/drs/python/repl_schema.py b/source4/torture/drs/python/repl_schema.py index 1d94b0fdec..55e653b824 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)) |