1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4-samba-tool: fixed ldb exception handling in domainlevel command

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andrew Tridgell 2010-11-29 14:14:01 +11:00
parent a1f96923e6
commit 6250690310

View File

@ -195,8 +195,8 @@ class cmd_domainlevel(Command):
ldb.FLAG_MOD_REPLACE, "nTMixedDomain")
try:
samdb.modify(m)
except LdbError, (num, _):
if num != ldb.ERR_UNWILLING_TO_PERFORM:
except ldb.LdbError, (enum, emsg):
if enum != ldb.ERR_UNWILLING_TO_PERFORM:
raise
# Directly on the base DN
@ -215,8 +215,8 @@ class cmd_domainlevel(Command):
"msDS-Behavior-Version")
try:
samdb.modify(m)
except LdbError, (num, _):
if num != ldb.ERR_UNWILLING_TO_PERFORM:
except ldb.LdbError, (enum, emsg):
if enum != ldb.ERR_UNWILLING_TO_PERFORM:
raise
level_domain = new_level_domain