[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Thu May 13 13:27:26 MDT 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100513/6e480ddc/attachment.pgp>


More information about the samba-technical mailing list