1
0
mirror of https://github.com/samba-team/samba.git synced 2025-05-30 01:05:50 +03:00

enablerecyclebin: Remove unused imports, fix formatting.

This commit is contained in:
Jelmer Vernooij 2011-06-30 10:29:23 +02:00
parent c9e3f6ab02
commit ac28c8216f

View File

@ -2,9 +2,7 @@
# #
# enabled the Recycle Bin optional feature # enabled the Recycle Bin optional feature
# #
import base64
import optparse import optparse
import os
import sys import sys
# Find right directory when running from source tree # Find right directory when running from source tree
@ -12,7 +10,7 @@ sys.path.insert(0, "bin/python")
import samba import samba
from samba import getopt as options, Ldb from samba import getopt as options, Ldb
from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError from ldb import SCOPE_BASE
import sys import sys
import ldb import ldb
from samba.auth import system_session from samba.auth import system_session
@ -48,8 +46,8 @@ configbase=rootDse["configurationNamingContext"]
msg = ldb.Message() msg = ldb.Message()
msg.dn = ldb.Dn(sam_ldb, "") msg.dn = ldb.Dn(sam_ldb, "")
msg["enableOptionalFeature"] = ldb.MessageElement( msg["enableOptionalFeature"] = ldb.MessageElement(
"CN=Partitions," + str(configbase) + ":766ddcd8-acd0-445e-f3b9-a7f9b6744f2a", "CN=Partitions," + str(configbase) + ":766ddcd8-acd0-445e-f3b9-a7f9b6744f2a",
ldb.FLAG_MOD_ADD, "enableOptionalFeature") ldb.FLAG_MOD_ADD, "enableOptionalFeature")
res = sam_ldb.modify(msg) res = sam_ldb.modify(msg)
print "Recycle Bin feature enabled" print "Recycle Bin feature enabled"