summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-29 14:14:01 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-29 18:04:42 +1100
commit62506903101e8e8e1cfc6c70fee245f97c646844 (patch)
treef5fddd7db385c967bb41c023e4efe473efc345ce /source4/scripting
parenta1f96923e655d58ff339e06536cac9d1135dd0cb (diff)
downloadsamba-62506903101e8e8e1cfc6c70fee245f97c646844.tar.gz
samba-62506903101e8e8e1cfc6c70fee245f97c646844.tar.bz2
samba-62506903101e8e8e1cfc6c70fee245f97c646844.zip
s4-samba-tool: fixed ldb exception handling in domainlevel command
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/domainlevel.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py b/source4/scripting/python/samba/netcmd/domainlevel.py
index 60cd844498..54a778c5fc 100644
--- a/source4/scripting/python/samba/netcmd/domainlevel.py
+++ b/source4/scripting/python/samba/netcmd/domainlevel.py
@@ -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