1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-25 00:59:11 +03:00

s4:net domainlevel tool - fix up the error handling as Jelmer suggested

Sorry, I've copied this from the "ldap.py" test and thought it would work.
This commit is contained in:
Matthias Dieter Wallnöfer
2010-05-14 18:59:36 +02:00
parent 6d95a204d7
commit 8608eaef76

View File

@ -200,7 +200,8 @@ class cmd_domainlevel(Command):
try:
samdb.modify(m)
except LdbError, (num, _):
self.assertEquals(num, ldb.ERR_UNWILLING_TO_PERFORM)
if num != ldb.ERR_UNWILLING_TO_PERFORM:
raise
# Directly on the base DN
m = ldb.Message()
@ -219,7 +220,8 @@ class cmd_domainlevel(Command):
try:
samdb.modify(m)
except LdbError, (num, _):
self.assertEquals(num, ldb.ERR_UNWILLING_TO_PERFORM)
if num != ldb.ERR_UNWILLING_TO_PERFORM:
raise
level_domain = new_level_domain
msgs.append("Domain function level changed!")