summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-13 22:35:06 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-13 22:42:22 +0200
commit49c8c130a0d08be7c869b9a63b5a37488003eac2 (patch)
tree01e523c0f3969c7cd02b8f66a07d249567c754c3
parent895b99fd6bfb1a65c3ae408bdf381e66783ac385 (diff)
downloadsamba-49c8c130a0d08be7c869b9a63b5a37488003eac2.tar.gz
samba-49c8c130a0d08be7c869b9a63b5a37488003eac2.tar.bz2
samba-49c8c130a0d08be7c869b9a63b5a37488003eac2.zip
s4:domainlevel - handle exceptions more precisely
LDB_ERR_UNWILLING_TO_PERFORM should be the right error code when the "msDS-Behavior-Version" was already raised by the first change as it is on Windows Server. When s4 itself does implement this trigger then we don't need to do the second write operation anymore (they're kept in sync).
-rw-r--r--source4/scripting/python/samba/netcmd/domainlevel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py b/source4/scripting/python/samba/netcmd/domainlevel.py
index 310747a3de..72559bb924 100644
--- a/source4/scripting/python/samba/netcmd/domainlevel.py
+++ b/source4/scripting/python/samba/netcmd/domainlevel.py
@@ -200,7 +200,7 @@ class cmd_domainlevel(Command):
try:
samdb.modify(m)
except LdbError, (num, _):
- pass
+ self.assertEquals(num, ldb.ERR_UNWILLING_TO_PERFORM)
# Directly on the base DN
m = ldb.Message()
@@ -219,7 +219,7 @@ class cmd_domainlevel(Command):
try:
samdb.modify(m)
except LdbError, (num, _):
- pass
+ self.assertEquals(num, ldb.ERR_UNWILLING_TO_PERFORM)
level_domain = new_level_domain
msgs.append("Domain function level changed!")