Hi Matthias, On Thu, 2010-05-13 at 10:12 -0500, Matthias Dieter Wallnöfer wrote: > diff --git a/source4/scripting/python/samba/netcmd/domainlevel.py > b/source4/scripting/python/samba/netcmd/domainlevel.py > index f7e67a2..310747a 100644 > --- a/source4/scripting/python/samba/netcmd/domainlevel.py > +++ b/source4/scripting/python/samba/netcmd/domainlevel.py > @@ -185,17 +185,42 @@ class cmd_domainlevel(Command): > > # Deactivate mixed/interim domain support > if level_domain_mixed != 0: > + # Directly on the base DN > m = ldb.Message() > m.dn = ldb.Dn(samdb, domain_dn) > m["nTMixedDomain"] = ldb.MessageElement("0", > ldb.FLAG_MOD_REPLACE, "nTMixedDomain") > samdb.modify(m) > + # Under partitions > + m = ldb.Message() > + m.dn = ldb.Dn(samdb, "CN=" + lp.get("workgroup") > + + ",CN=Partitions,CN=Configuration," + domain_dn) > + m["nTMixedDomain"] = ldb.MessageElement("0", > + ldb.FLAG_MOD_REPLACE, "nTMixedDomain") > + try: > + samdb.modify(m) > + except LdbError, (num, _): > + pass ^^^ Please catch specific error codes here rather than everything. Otherwise we'll end up eating exception for errors we don't want to ignore.
Cheers, Jelmer
signature.asc
Description: This is a digitally signed message part