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:
@ -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!")
|
||||
|
Reference in New Issue
Block a user