diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-14 18:59:36 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-05-14 19:03:18 +0200 |
commit | 8608eaef76631666a41109317d2a9b20979c5025 (patch) | |
tree | d4c27b73105b09d32decd5c77d5ece2e9b0ca7bc | |
parent | 6d95a204d7115a10608759eaabcbfbe495ed2802 (diff) | |
download | samba-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.
-rw-r--r-- | source4/scripting/python/samba/netcmd/domainlevel.py | 6 |
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!") |