[SCM] Samba Shared Repository - branch master updated
Jelmer Vernooij
jelmer at samba.org
Wed Nov 2 13:10:03 MDT 2011
The branch, master has been updated
via 23d3880 samba.netcmd: Pass in outf/errf.
via 21be155 pyldb: Remove duplicate definition of SYNTAX_DN.
via 3ce126f s4-python: samba.provision: Require schema to be passed in - code path which handles schema not being specified is broken anyway.
via aa882d3 samba.common: Fix formatting of docstring (trips up pydoctor).
from 1c72d3b s3-waf: convert libcli_netlogon3 into a private library.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 23d3880725da4cb92062b5945b7c93202f4ea504
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Nov 2 16:39:47 2011 +0100
samba.netcmd: Pass in outf/errf.
Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
Autobuild-Date: Wed Nov 2 20:09:40 CET 2011 on sn-devel-104
commit 21be155af839f72375051cf74de76f4487bdc3ea
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Nov 2 16:33:56 2011 +0100
pyldb: Remove duplicate definition of SYNTAX_DN.
commit 3ce126f352288fc4ebbd0ac12b54c77f7b79c063
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Nov 2 16:23:06 2011 +0100
s4-python: samba.provision: Require schema to be passed in - code path which handles schema not being specified is broken anyway.
commit aa882d33232745607b305aff0bf2000fc5d449ee
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Nov 2 16:22:16 2011 +0100
samba.common: Fix formatting of docstring (trips up pydoctor).
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/pyldb.c | 1 -
source4/scripting/python/samba/common.py | 7 ++++---
source4/scripting/python/samba/netcmd/__init__.py | 7 ++++---
.../scripting/python/samba/provision/__init__.py | 6 +-----
source4/scripting/python/samba/tests/netcmd.py | 4 +---
5 files changed, 10 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index 673cee2..b46bdcd 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -3372,7 +3372,6 @@ void initldb(void)
#define ADD_LDB_STRING(val) PyModule_AddObject(m, #val, PyString_FromString(LDB_## val))
ADD_LDB_STRING(SYNTAX_DN);
- ADD_LDB_STRING(SYNTAX_DN);
ADD_LDB_STRING(SYNTAX_DIRECTORY_STRING);
ADD_LDB_STRING(SYNTAX_INTEGER);
ADD_LDB_STRING(SYNTAX_BOOLEAN);
diff --git a/source4/scripting/python/samba/common.py b/source4/scripting/python/samba/common.py
index 9738966..b67036c 100644
--- a/source4/scripting/python/samba/common.py
+++ b/source4/scripting/python/samba/common.py
@@ -20,10 +20,11 @@
import ldb, dsdb
-def confirm(msg, forced = False, allow_all=False):
+def confirm(msg, forced=False, allow_all=False):
"""confirm an action with the user
- :param msg: A string to print to the user
- :param forced: Are the answer forced
+
+ :param msg: A string to print to the user
+ :param forced: Are the answer forced
"""
if forced:
print("%s [YES]" % msg)
diff --git a/source4/scripting/python/samba/netcmd/__init__.py b/source4/scripting/python/samba/netcmd/__init__.py
index bf08457..58353a0 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -30,7 +30,6 @@ class Option(optparse.Option):
pass
-
class Command(object):
"""A samba-tool command."""
@@ -63,8 +62,10 @@ class Command(object):
"credopts": options.CredentialsOptions,
"versionopts": options.VersionOptions,
}
- outf = sys.stdout
- errf = sys.stderr
+
+ def __init__(self, outf=sys.stdout, errf=sys.stderr):
+ self.outf = outf
+ self.errf = errf
def usage(self, prog, *args):
parser, _ = self._create_parser(prog)
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 5e7e374..a44bb8e 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1200,8 +1200,7 @@ def create_default_gpo(sysvolpath, dnsdomain, policyguid, policyguid_dc):
def setup_samdb(path, session_info, provision_backend, lp, names,
- logger, fill, serverrole,
- am_rodc=False, schema=None):
+ logger, fill, serverrole, schema, am_rodc=False):
"""Setup a complete SAM Database.
:note: This will wipe the main SAM database file!
@@ -1212,9 +1211,6 @@ def setup_samdb(path, session_info, provision_backend, lp, names,
provision_backend=provision_backend, session_info=session_info,
names=names, serverrole=serverrole, schema=schema)
- if schema is None:
- schema = Schema(domainsid, schemadn=names.schemadn)
-
# Load the database, but don's load the global schema and don't connect
# quite yet
samdb = SamDB(session_info=session_info, url=None, auto_connect=False,
diff --git a/source4/scripting/python/samba/tests/netcmd.py b/source4/scripting/python/samba/tests/netcmd.py
index d7c6482..66646ff 100644
--- a/source4/scripting/python/samba/tests/netcmd.py
+++ b/source4/scripting/python/samba/tests/netcmd.py
@@ -28,9 +28,7 @@ import samba.tests
class NetCmdTestCase(samba.tests.TestCase):
def run_netcmd(self, cmd_klass, args, retcode=0):
- cmd = cmd_klass()
- cmd.outf = StringIO()
- cmd.errf = StringIO()
+ cmd = cmd_klass(outf=StringIO(), errf=StringIO())
try:
retval = cmd._run(cmd_klass.__name__, *args)
except Exception, e:
--
Samba Shared Repository
More information about the samba-cvs
mailing list