summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-14 18:59:36 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-14 19:03:18 +0200
commit8608eaef76631666a41109317d2a9b20979c5025 (patch)
treed4c27b73105b09d32decd5c77d5ece2e9b0ca7bc /source4/scripting/python
parent6d95a204d7115a10608759eaabcbfbe495ed2802 (diff)
downloadsamba-8608eaef76631666a41109317d2a9b20979c5025.tar.gz
samba-8608eaef76631666a41109317d2a9b20979c5025.tar.bz2
samba-8608eaef76631666a41109317d2a9b20979c5025.zip
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.
Diffstat (limited to 'source4/scripting/python')
-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!")