summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/netcmd/domainlevel.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py b/source4/scripting/python/samba/netcmd/domainlevel.py
index 72559bb924..4278ae5e4a 100644
--- a/source4/scripting/python/samba/netcmd/domainlevel.py
+++ b/source4/scripting/python/samba/netcmd/domainlevel.py
@@ -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!")