[SCM] Samba Shared Repository - branch master updated

Douglas Bagnall dbagnall at samba.org
Thu Nov 1 08:41:03 UTC 2018


The branch, master has been updated
       via  790acef samba-tool ntacl: remove unused imports and variables
       via  5f19bf6 python/tests/docs: remove unused import, variables
       via  eeb1e81 python/join: remove unused imports and variables
       via  d177797 python/upgradehelpers: remove unused provision imports
       via  00eaea5 samba-tool processes: remove unused imports and variables
       via  77b9b5e samba-tool domain: remove unused variables
       via  4e19b69 py/tests/dcerpc_integer: remove dup tests
       via  5e79630 autobuild: remove unused variables
       via  e37edb7 python/tests/source: remove useless local variable
       via  cf3d35c python/tests/credentials: remove unused variables
       via  78f0860 python/xattr: remove unused variable
       via  55aaa9c python/upgradehelpers: remove unused variable
       via  d7f26be samba-tool dbcheck: remove unused variable
       via  d5f1ea6 dbchecker: remove unused variables
       via  202be59 samba-tool spn: remove unused variables
       via  866d5b3 samba-tool rodc: remove unused variable
       via  68a43a1 python/samba3: import passdb in the manner it is used
       via  1ca5bf3 python/kcc/graph: import KCCError, which is used somewhere
       via  1a66eeb tests/rodc_rwdc: fix message format
       via  9055602 traffic_replay: Exception has no .message
       via  9c2447e py/tests/dcerpc_rpc: Py3 compat integer types
       via  aafe6bf waflib: fix syntax error in string format
       via  d4e0660 waflib: add necessary imports
       via  7b1d878 python/remove_dc: fix Exception construction
       via  7fafd57 python/remove_dc: fix formating syntax (missing %s)
       via  7db224b provision/backend: LDAPBackendResult takes no creds
       via  71f91cc provision/backend: fix formating syntax
       via  67c5ab1 provision: fix string formatting (number of args)
       via  f6f98ed provision: fix string format syntax
       via  d9b4579 Python provision: remove "ExistingBackend"
       via  f0c45e0 python dbcheck: use real exception name
       via  7058e21 python: avoid useless work in dsdb_Dn.__cmp__
       via  4be0bcb python join: use the sd_utils we imported
       via  9148ec7 s4/dsdb/pytest/sites: do not use variables out of scope
       via  78ead84 ldb/tests/py/index: remove dup value in dictionary
       via  fc64f25 ldb/tests/py/api: use proper name for ldb.LdbError
       via  f129ca9 python/tests/dnscmd: don't use undefined name
       via  5304ea4 python/tests/dsdb: use correct variable names
       via  cf7f14a python/subnets: use the correct variable name
       via  ced6b6c samba-tool user: fix message format
       via  e25878e samba-tool: let self.usage() find argv[0] by itself
       via  e621472 dbcheck: fix function call (right arguments)
       via  9057b1c dbcheck: fix message formatting
       via  2fedb95 python: PY3 Exceptions don't have .message
       via  2013cd2 script/show_test_time: attempt py3 compat
       via  b1ba193 s4/scripting/pfm_verify: PY3: use compat.text_type
       via  b4fff0a s4/scripting/samba_upgradedns: avoid .has_key()
       via  2e6fccb s4/scripting/minschema: whitespace reformat and py3 compatible print
       via  f109fde s4/scripting/autoidl: py3 compatible except
       via  8532308 s4/script/depfilter.py: use py3 compatible regex import
       via  6c1d605 tests/python/sec_descriptor: safer use of super()
       via  4e69407 tests/python/notification: safer use of super()
       via  a6368ae s4/dsdb/pytest/ldap_schema: fix typo in docs
       via  99eee0a selftest/format_subunit_json: py3 print()
       via  371297a tests/samba_tool/provision_password_check: follow super inheritance
      from  40bd0a9 nsswitch: Run nsswitch thread test

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 790acef279dedbd93fb98165094002f038e3d265
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 12:40:50 2018 +1300

    samba-tool ntacl: remove unused imports and variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>
    
    Autobuild-User(master): Douglas Bagnall <dbagnall at samba.org>
    Autobuild-Date(master): Thu Nov  1 09:40:02 CET 2018 on sn-devel-144

commit 5f19bf63dc85c59d324aaa820df783baaaf8712b
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:42:45 2018 +1300

    python/tests/docs: remove unused import, variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit eeb1e81e25ff8477fe00b36ba8c90a81e6241df9
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:06:16 2018 +1300

    python/join: remove unused imports and variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit d1777971010621e750d352d219a344fef4a11c33
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:29:06 2018 +1300

    python/upgradehelpers: remove unused provision imports
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 00eaea56f6b9088d2024abf77960171953ad6909
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 12:41:12 2018 +1300

    samba-tool processes: remove unused imports and variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 77b9b5e89d8756c5c213a295dabcb05eefcb5aa0
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 12:36:58 2018 +1300

    samba-tool domain: remove unused variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 4e19b69b4df07f95c5df23b2c08c58ba988d3e43
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:39:13 2018 +1300

    py/tests/dcerpc_integer: remove dup tests
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 5e796308229f6fc13610f8e8378f29db0b6418e7
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 16:03:22 2018 +1300

    autobuild: remove unused variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit e37edb7639b7b7ddec0cbed9d0f1b235b22f2eed
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 14:00:50 2018 +1300

    python/tests/source: remove useless local variable
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit cf3d35c8a9604c6b2211d552bc9e02433844ea44
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:41:23 2018 +1300

    python/tests/credentials: remove unused variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 78f0860cff176d1d5842cb65684a49139c87a4ed
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:14:32 2018 +1300

    python/xattr: remove unused variable
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 55aaa9c8498ded15250377f5b1e0c0d4abe1c9a7
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:14:02 2018 +1300

    python/upgradehelpers: remove unused variable
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit d7f26be93c640487fed2865561180bf49c1584c2
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 12:35:56 2018 +1300

    samba-tool dbcheck: remove unused variable
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit d5f1ea607757967dae136a8148163443c322fd0e
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 12:52:46 2018 +1300

    dbchecker: remove unused variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

commit 202be5994ef2fe7b79d14830468b1eac005938c3
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 00:33:30 2018 +1300

    samba-tool spn: remove unused variables
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 866d5b3cd84359eb3e1a1ab8d28d93c0f4978cf7
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 00:33:05 2018 +1300

    samba-tool rodc: remove unused variable
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 68a43a189ed3329146ab0f3bed6ae9d27e73ffed
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:40:23 2018 +1300

    python/samba3: import passdb in the manner it is used
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 1ca5bf32ad872673c7f2d33c8710238c3a19488b
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:38:27 2018 +1300

    python/kcc/graph: import KCCError, which is used somewhere
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 1a66eeb1242ef6715c362c430e619c015334ced5
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:08:28 2018 +1300

    tests/rodc_rwdc: fix message format
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 9055602e639cdc39c71e13c35ca93c9a1b51eb70
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:49:24 2018 +1300

    traffic_replay: Exception has no .message
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 9c2447e2d8fbc183bc399f7fe1c79bee5e0d96cd
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:40:12 2018 +1300

    py/tests/dcerpc_rpc: Py3 compat integer types
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit aafe6bf96ac9e14b5546c31b51dcfd010b9a5717
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:33:26 2018 +1300

    waflib: fix syntax error in string format
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit d4e06603542623045c8811d14d5e25fc434435da
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:32:35 2018 +1300

    waflib: add necessary imports
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 7b1d878f4c11c412af15e53ee41e8a4b2f7f0b02
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 21:03:21 2018 +1300

    python/remove_dc: fix Exception construction
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 7fafd57998a19e4d7d92a7aebeb70d69bb427389
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 21:02:46 2018 +1300

    python/remove_dc: fix formating syntax (missing %s)
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 7db224bdc23122b99cfd632d990e4e153e6be8ab
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 21:01:18 2018 +1300

    provision/backend: LDAPBackendResult takes no creds
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 71f91ccda4867fd2f010be885504146ab334bee6
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 21:00:01 2018 +1300

    provision/backend: fix formating syntax
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 67c5ab1752eb9e64fd46eb28589af6c9f5546828
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:52:05 2018 +1300

    provision: fix string formatting (number of args)
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit f6f98ed2d3a436745bc8e3f8131d9b9de4092d4b
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:49:38 2018 +1300

    provision: fix string format syntax
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit d9b457941667bf011ab15e33567a6034133e5dde
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:41:50 2018 +1300

    Python provision: remove "ExistingBackend"
    
    This was unused and broken. e.g. here:
    
    -    def init(self):
    -        # Check to see that this 'existing' LDAP backend in fact exists
    -        ldapi_db = Ldb(self.ldapi_uri)
    
    there is no attribute self.ldapi_uri, so this would always raise an
    exception.
    
    It was being left around in case it became useful, but that doesn't
    seem to be happening.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit f0c45e0831f502e04e4100d795d0a06ff06eb3fe
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 19:31:26 2018 +1300

    python dbcheck: use real exception name
    
    and conventional indent
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 7058e21ebecaaf397d4ff502f4ba6bb2e4c0e564
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 19:27:53 2018 +1300

    python: avoid useless work in dsdb_Dn.__cmp__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 4be0bcb12bddb0a5d8dedb591f7c1af697fbacf8
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 18:38:27 2018 +1300

    python join: use the sd_utils we imported
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 9148ec7d658d306c8d98eb92d918c554adeae165
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 17:23:20 2018 +1300

    s4/dsdb/pytest/sites: do not use variables out of scope
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 78ead841bfb8a37d50fbeb186deb6ce529ebeb21
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 16:48:38 2018 +1300

    ldb/tests/py/index: remove dup value in dictionary
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit fc64f2586dd7b624a19bb5fb6797be19d525ae92
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 16:48:12 2018 +1300

    ldb/tests/py/api: use proper name for ldb.LdbError
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit f129ca9892ac8f547ecd60c0b086c925a0890d25
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 14:44:49 2018 +1300

    python/tests/dnscmd: don't use undefined name
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 5304ea44c97507822edac2ccf0ec5a49d0692627
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:43:28 2018 +1300

    python/tests/dsdb: use correct variable names
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit cf7f14a4be12f2e677d8ce5f2a7b00102f69b87d
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Thu Oct 11 13:11:06 2018 +1300

    python/subnets: use the correct variable name
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit ced6b6c9dd8b1d4952aef5147131b8f485c1410c
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:40:16 2018 +1300

    samba-tool user: fix message format
    
    There were 2 % formats and 3 arguments.
    Also reformat for line length
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit e25878ecca2d73a75204979e2d53bc766e8b7e4f
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:20:55 2018 +1300

    samba-tool: let self.usage() find argv[0] by itself
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit e621472cc89702bd01ad9c88beab0c3986a78d2c
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:18:03 2018 +1300

    dbcheck: fix function call (right arguments)
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 9057b1c45e66698dd86bc3fd830e6c7533d59c45
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:08:31 2018 +1300

    dbcheck: fix message formatting
    
    previously these would have raised an exception
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 2fedb9502238009522cdb12ce6f131f46be82662
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Oct 26 20:36:57 2018 +1300

    python: PY3 Exceptions don't have .message
    
    but str(e) is the same as str(e.message), so we can use that
    on 2 and 3.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 2013cd2889df484efbfb106fea38085bfbb0315c
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:48:42 2018 +1300

    script/show_test_time: attempt py3 compat
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit b1ba193dd0afdcf1d7320277527b652fcb762d32
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:17:43 2018 +1300

    s4/scripting/pfm_verify: PY3: use compat.text_type
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit b4fff0ac7d4fd8072d0ed8028b4d4f7a3722ae83
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:17:07 2018 +1300

    s4/scripting/samba_upgradedns: avoid .has_key()
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 2e6fccbb93dc7e31fcf1d056e0ac964d0c9f01f8
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:16:21 2018 +1300

    s4/scripting/minschema: whitespace reformat and py3 compatible print
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit f109fde362c81a9e0e248a244a75a9a7dbaa8f43
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:12:20 2018 +1300

    s4/scripting/autoidl: py3 compatible except
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 853230888324f17513ebe7d9001a87e690e63042
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:11:41 2018 +1300

    s4/script/depfilter.py: use py3 compatible regex import
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 6c1d605348fde3970ff81804369a17574d7a5564
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:10:58 2018 +1300

    tests/python/sec_descriptor: safer use of super()
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 4e694079e5f3a662c678cce0e87769c62ddeefeb
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 11:02:51 2018 +1300

    tests/python/notification: safer use of super()
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit a6368ae6d4520f6be29068b3d3e6f26f1366f1d8
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:56:15 2018 +1300

    s4/dsdb/pytest/ldap_schema: fix typo in docs
    
    Commit 311727947799e896e05d644103c9db80a665de88 removed a duplicate
    test but it removed the wrong one, leaving this dreadful typo.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 99eee0a669e285bfa0a7f385f2a2e7893b6c94df
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:50:07 2018 +1300

    selftest/format_subunit_json: py3 print()
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

commit 371297a59b2b70cd539b20f7ec55bd53557bb21d
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Sun Oct 28 10:43:42 2018 +1300

    tests/samba_tool/provision_password_check: follow super inheritance
    
    We were skipping a level in the inheritance chain, which had no effect
    in this case (no .setUps or .tearDowns were missed) but it would be
    confusing if the parents ever changed.
    
    Note: in python 3, you just call super() with no args, and it works
    out the right thing.
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Noel Power <noel.power at suse.com>

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_utils.py                 |  3 ++-
 buildtools/wafsamba/samba_wildcard.py              |  2 +-
 lib/ldb/tests/python/api.py                        |  4 ++--
 lib/ldb/tests/python/index.py                      |  1 -
 python/samba/common.py                             |  2 --
 python/samba/dbchecker.py                          | 18 ++++++---------
 python/samba/join.py                               |  7 ++----
 python/samba/kcc/graph.py                          |  1 +
 python/samba/netcmd/__init__.py                    |  4 ++--
 python/samba/netcmd/dbcheck.py                     |  1 -
 python/samba/netcmd/domain.py                      |  4 ----
 python/samba/netcmd/ntacl.py                       |  6 +----
 python/samba/netcmd/ou.py                          | 14 +++++------
 python/samba/netcmd/processes.py                   |  3 ---
 python/samba/netcmd/rodc.py                        |  1 -
 python/samba/netcmd/spn.py                         |  2 --
 python/samba/netcmd/user.py                        |  7 +++---
 python/samba/provision/__init__.py                 | 20 ++++++++--------
 python/samba/provision/backend.py                  | 27 ++++------------------
 python/samba/remove_dc.py                          | 13 ++++++-----
 python/samba/samba3/__init__.py                    |  2 +-
 python/samba/subnets.py                            |  2 +-
 python/samba/tests/credentials.py                  |  4 ----
 python/samba/tests/dcerpc/integer.py               | 14 -----------
 python/samba/tests/dcerpc/testrpc.py               |  3 ++-
 python/samba/tests/docs.py                         |  4 ----
 python/samba/tests/dsdb.py                         |  4 ++--
 python/samba/tests/samba_tool/dnscmd.py            |  2 +-
 .../tests/samba_tool/provision_password_check.py   |  4 ++--
 python/samba/tests/source.py                       |  1 -
 python/samba/upgradehelpers.py                     |  5 ++--
 python/samba/xattr.py                              |  1 -
 script/autobuild.py                                |  2 --
 script/show_test_time                              |  2 +-
 script/traffic_replay                              |  2 +-
 selftest/format-subunit-json                       |  8 +++----
 source4/dsdb/tests/python/ldap_schema.py           |  2 +-
 source4/dsdb/tests/python/notification.py          |  2 +-
 source4/dsdb/tests/python/rodc_rwdc.py             |  2 +-
 source4/dsdb/tests/python/sec_descriptor.py        |  2 +-
 source4/dsdb/tests/python/sites.py                 |  4 ++--
 source4/script/depfilter.py                        |  4 ++--
 source4/scripting/bin/autoidl                      |  4 ++--
 source4/scripting/bin/minschema                    | 16 ++++++-------
 source4/scripting/bin/samba_upgradedns             |  4 ++--
 source4/scripting/devel/pfm_verify.py              |  4 ++--
 46 files changed, 88 insertions(+), 156 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index b4da3c5..58a0b71 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -4,6 +4,7 @@
 import os, sys, re, fnmatch, shlex, inspect
 from optparse import SUPPRESS_HELP
 from waflib import Build, Options, Utils, Task, Logs, Configure, Errors, Context
+from waflib import Scripting
 from waflib.TaskGen import feature, before, after
 from waflib.Configure import ConfigurationContext
 from waflib.Logs import debug
@@ -327,7 +328,7 @@ def RUN_COMMAND(cmd,
         return os.WEXITSTATUS(status)
     if os.WIFSIGNALED(status):
         return - os.WTERMSIG(status)
-    Logs.error("Unknown exit reason %d for command: %s" (status, cmd))
+    Logs.error("Unknown exit reason %d for command: %s" % (status, cmd))
     return -1
 
 
diff --git a/buildtools/wafsamba/samba_wildcard.py b/buildtools/wafsamba/samba_wildcard.py
index 5e15eff..6173ce8 100644
--- a/buildtools/wafsamba/samba_wildcard.py
+++ b/buildtools/wafsamba/samba_wildcard.py
@@ -2,7 +2,7 @@
 
 import os, datetime, fnmatch
 from waflib import Scripting, Utils, Options, Logs, Errors
-from waflib import ConfigSet
+from waflib import ConfigSet, Context
 from samba_utils import LOCAL_CACHE, os_path_relpath
 
 def run_task(t, k):
diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py
index 0e16004..6be410b 100755
--- a/lib/ldb/tests/python/api.py
+++ b/lib/ldb/tests/python/api.py
@@ -2792,7 +2792,7 @@ class LdbResultTests(LdbBaseTest):
             # and commit
             try:
                 child_ldb.transaction_commit()
-            except LdbError as err:
+            except ldb.LdbError as err:
                 # We print this here to see what went wrong in the child
                 print(err)
                 os._exit(1)
@@ -2863,7 +2863,7 @@ class LdbResultTests(LdbBaseTest):
             # and commit
             try:
                 child_ldb.transaction_commit()
-            except LdbError as err:
+            except ldb.LdbError as err:
                 # We print this here to see what went wrong in the child
                 print(err)
                 os._exit(1)
diff --git a/lib/ldb/tests/python/index.py b/lib/ldb/tests/python/index.py
index 5d0b752..63486eb 100755
--- a/lib/ldb/tests/python/index.py
+++ b/lib/ldb/tests/python/index.py
@@ -1314,7 +1314,6 @@ class RejectSubDBIndex(LdbBaseTest):
             self.l.add({"dn": "@INDEXLIST",
                         "@IDX_LMDB_SUBDB": [b"1"],
                         "@IDXONE": [b"1"],
-                        "@IDXONE": [b"1"],
                         "@IDXGUID": [b"objectUUID"],
                         "@IDX_DN_GUID": [b"GUID"],
                         })
diff --git a/python/samba/common.py b/python/samba/common.py
index 76d00e3..8876e4f 100644
--- a/python/samba/common.py
+++ b/python/samba/common.py
@@ -110,9 +110,7 @@ class dsdb_Dn(object):
         dn1 = self
         dn2 = other
         guid1 = dn1.dn.get_extended_component("GUID")
-        guid1b = ndr_pack(misc.GUID(guid1))
         guid2 = dn2.dn.get_extended_component("GUID")
-        guid2b = ndr_pack(misc.GUID(guid2))
 
         v = cmp(guid1, guid2)
         if v != 0:
diff --git a/python/samba/dbchecker.py b/python/samba/dbchecker.py
index c70ca7b..9af1116 100644
--- a/python/samba/dbchecker.py
+++ b/python/samba/dbchecker.py
@@ -48,11 +48,11 @@ def dump_attr_values(vals):
     result = ""
     for value in vals:
         if len(result):
-           result = "," + result
+            result = "," + result
         try:
-           result = result + str(value)
-        except UnicodeDecode:
-           result = result + repr(value)
+            result = result + str(value)
+        except UnicodeDecodeError:
+            result = result + repr(value)
     return result
 
 class dbcheck(object):
@@ -650,7 +650,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
     def err_incorrect_binary_dn(self, dn, attrname, val, dsdb_dn, errstr):
         """handle an incorrect binary DN component"""
         self.report("ERROR: %s binary component for %s in object %s - %s" % (errstr, attrname, dn, val))
-        controls = ["extended_dn:1:1", "show_recycled:1"]
 
         if not self.confirm_all('Change DN to %s?' % str(dsdb_dn), 'fix_all_binary_dn'):
             self.report("Not fixing %s" % errstr)
@@ -1099,7 +1098,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
             return (missing_forward_links, error_count)
 
         if forward_syntax != ldb.SYNTAX_DN:
-            self.report("Not checking for missing forward links for syntax: %s",
+            self.report("Not checking for missing forward links for syntax: %s" %
                         forward_syntax)
             return (missing_forward_links, error_count)
 
@@ -1486,7 +1485,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
         '''
 
         repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob, val)
-        obj = repl.ctr
 
         for o in repl.ctr.array:
             if o.attid == attid:
@@ -1504,7 +1502,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
         in_schema_nc = dn.is_child_of(self.schema_dn)
 
         repl = ndr_unpack(drsblobs.replPropertyMetaDataBlob, val)
-        obj = repl.ctr
 
         for o in repl.ctr.array:
             att = self.samdb_schema.get_lDAPDisplayName_by_attid(o.attid)
@@ -1694,7 +1691,6 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
         '''re-write the SD due to not matching the default (optional mode for fixing an incorrect provision)'''
         sd_attr = "nTSecurityDescriptor"
         sd_val = ndr_pack(sd)
-        sd_old_val = ndr_pack(sd_old)
         sd_flags = security.SECINFO_DACL | security.SECINFO_SACL
         if sd.owner_sid is not None:
             sd_flags |= security.SECINFO_OWNER
@@ -1971,7 +1967,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
         target = self.samdb.get_dsServiceName()
 
         if self.samdb.am_rodc():
-            self.report('Not fixing %s for the RODC' % (attr, obj.dn))
+            self.report('Not fixing %s %s for the RODC' % (attr, obj.dn))
             return
 
         if not self.confirm_all('Add yourself to the replica locations for %s?'
@@ -2244,7 +2240,7 @@ newSuperior: %s""" % (str(from_dn), str(to_rdn), str(to_base)))
                 elif len(obj[attrname][0]) % 2 != 0:
                     # This is a value that isn't even in length
                     error_count += 1
-                    self.err_odd_userParameters(obj, attrname, obj[attrname])
+                    self.err_odd_userParameters(obj, attrname)
                     continue
 
                 elif obj[attrname][0][1] == b'\x00'[0] and obj[attrname][0][2] == b'\x00'[0] and obj[attrname][0][3] == b'\x00'[0] and obj[attrname][0][4] != b'\x00'[0] and obj[attrname][0][5] == b'\x00'[0]:
diff --git a/python/samba/join.py b/python/samba/join.py
index 321b8c2..c2d9254 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -24,7 +24,6 @@ from samba.samdb import SamDB
 from samba import gensec, Ldb, drs_utils, arcfour_encrypt, string_to_byte_array
 import ldb
 import samba
-import sys
 import uuid
 from samba.ndr import ndr_pack, ndr_unpack
 from samba.dcerpc import security, drsuapi, misc, nbt, lsa, drsblobs, dnsserver, dnsp
@@ -41,10 +40,9 @@ from samba import read_and_sub_file
 from samba import werror
 from base64 import b64encode
 from samba import WERRORError, NTSTATUSError
-from samba.dnsserver import ARecord, AAAARecord, PTRRecord, CNameRecord, NSRecord, MXRecord, SOARecord, SRVRecord, TXTRecord
 from samba import sd_utils
+from samba.dnsserver import ARecord, AAAARecord, CNameRecord
 import logging
-import talloc
 import random
 import time
 import re
@@ -1083,7 +1081,6 @@ class DCJoinContext(object):
         """
 
         client_version = dnsserver.DNS_CLIENT_VERSION_LONGHORN
-        record_type = dnsp.DNS_TYPE_A
         select_flags = dnsserver.DNS_RPC_VIEW_AUTHORITY_DATA |\
             dnsserver.DNS_RPC_VIEW_NO_CHILDREN
 
@@ -1103,7 +1100,7 @@ class DCJoinContext(object):
 
         name_found = True
 
-        sd_helper = samba.sd_utils.SDUtils(ctx.samdb)
+        sd_helper = sd_utils.SDUtils(ctx.samdb)
 
         change_owner_sd = security.descriptor()
         change_owner_sd.owner_sid = ctx.new_dc_account_sid
diff --git a/python/samba/kcc/graph.py b/python/samba/kcc/graph.py
index 327b471..d3044dd 100644
--- a/python/samba/kcc/graph.py
+++ b/python/samba/kcc/graph.py
@@ -23,6 +23,7 @@ import itertools
 import heapq
 
 from samba.kcc.graph_utils import write_dot_file, verify_and_dot, verify_graph
+from samba.kcc.kcc_utils import KCCError
 from samba.ndr import ndr_pack
 from samba.dcerpc import misc
 
diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py
index d73ffe9..cb22b5d 100644
--- a/python/samba/netcmd/__init__.py
+++ b/python/samba/netcmd/__init__.py
@@ -92,7 +92,7 @@ class Command(object):
         self.outf = outf
         self.errf = errf
 
-    def usage(self, prog, *args):
+    def usage(self, prog=None):
         parser, _ = self._create_parser(prog)
         parser.print_usage()
 
@@ -129,7 +129,7 @@ class Command(object):
         if force_traceback or samba.get_debug_level() >= 3:
             traceback.print_tb(etraceback, file=self.errf)
 
-    def _create_parser(self, prog, epilog=None):
+    def _create_parser(self, prog=None, epilog=None):
         parser = optparse.OptionParser(
             usage=self.synopsis,
             description=self.full_description,
diff --git a/python/samba/netcmd/dbcheck.py b/python/samba/netcmd/dbcheck.py
index 6369e7fb..965288b 100644
--- a/python/samba/netcmd/dbcheck.py
+++ b/python/samba/netcmd/dbcheck.py
@@ -41,7 +41,6 @@ class cmd_dbcheck(Command):
 
     def process_yes(option, opt, value, parser):
         assert value is None
-        done = 0
         rargs = parser.rargs
         if rargs:
             arg = rargs[0]
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 159b571..82e6ece 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -26,7 +26,6 @@ from __future__ import print_function
 from __future__ import division
 import samba.getopt as options
 import ldb
-import string
 import os
 import sys
 import ctypes
@@ -3879,7 +3878,6 @@ This command expunges tombstones from the database."""
     def run(self, *ncs, **kwargs):
         sambaopts = kwargs.get("sambaopts")
         credopts = kwargs.get("credopts")
-        versionpts = kwargs.get("versionopts")
         H = kwargs.get("H")
         current_time_string = kwargs.get("current_time")
         tombstone_lifetime = kwargs.get("tombstone_lifetime")
@@ -4135,7 +4133,6 @@ class cmd_domain_schema_upgrade(Command):
         updates_allowed_overriden = False
         sambaopts = kwargs.get("sambaopts")
         credopts = kwargs.get("credopts")
-        versionpts = kwargs.get("versionopts")
         lp = sambaopts.get_loadparm()
         creds = credopts.get_credentials(lp)
         H = kwargs.get("H")
@@ -4280,7 +4277,6 @@ class cmd_domain_functional_prep(Command):
         updates_allowed_overriden = False
         sambaopts = kwargs.get("sambaopts")
         credopts = kwargs.get("credopts")
-        versionpts = kwargs.get("versionopts")
         lp = sambaopts.get_loadparm()
         creds = credopts.get_credentials(lp)
         H = kwargs.get("H")
diff --git a/python/samba/netcmd/ntacl.py b/python/samba/netcmd/ntacl.py
index 323add7..b5dbc1f 100644
--- a/python/samba/netcmd/ntacl.py
+++ b/python/samba/netcmd/ntacl.py
@@ -26,14 +26,12 @@ from samba.samdb import SamDB
 from samba.samba3 import param as s3param, passdb, smbd
 from samba import provision
 
-from ldb import SCOPE_BASE
-import os
-
 from samba.auth import (
     system_session,
     session_info_fill_unix,
     copy_session_info,
 )
+
 from samba.netcmd import (
     Command,
     CommandError,
@@ -236,7 +234,6 @@ class cmd_ntacl_sysvolreset(Command):
     def run(self, use_ntvfs=False, use_s3fs=False,
             credopts=None, sambaopts=None, versionopts=None):
         lp = sambaopts.get_loadparm()
-        path = lp.private_path("secrets.ldb")
         creds = credopts.get_credentials(lp)
         creds.set_kerberos_state(DONT_USE_KERBEROS)
         logger = self.get_logger()
@@ -298,7 +295,6 @@ class cmd_ntacl_sysvolcheck(Command):
 
     def run(self, credopts=None, sambaopts=None, versionopts=None):
         lp = sambaopts.get_loadparm()
-        path = lp.private_path("secrets.ldb")
         creds = credopts.get_credentials(lp)
         creds.set_kerberos_state(DONT_USE_KERBEROS)
         logger = self.get_logger()
diff --git a/python/samba/netcmd/ou.py b/python/samba/netcmd/ou.py
index 0224701..f4e0183 100644
--- a/python/samba/netcmd/ou.py
+++ b/python/samba/netcmd/ou.py
@@ -73,12 +73,12 @@ class cmd_rename(Command):
             full_old_ou_dn = samdb.normalize_dn_in_domain(old_ou_dn)
         except Exception as e:
             raise CommandError('Invalid old_ou_dn "%s": %s' %
-                               (old_ou_dn, e.message))
+                               (old_ou_dn, e))
         try:
             full_new_ou_dn = samdb.normalize_dn_in_domain(new_ou_dn)
         except Exception as e:
             raise CommandError('Invalid new_ou_dn "%s": %s' %
-                               (new_ou_dn, e.message))
+                               (new_ou_dn, e))
 
         try:
             res = samdb.search(base=full_old_ou_dn,
@@ -138,12 +138,12 @@ class cmd_move(Command):
             full_old_ou_dn = samdb.normalize_dn_in_domain(old_ou_dn)
         except Exception as e:
             raise CommandError('Invalid old_ou_dn "%s": %s' %
-                               (old_ou_dn, e.message))
+                               (old_ou_dn, e))
         try:
             full_new_parent_dn = samdb.normalize_dn_in_domain(new_parent_dn)
         except Exception as e:
             raise CommandError('Invalid new_parent_dn "%s": %s' %
-                               (new_parent_dn, e.message))
+                               (new_parent_dn, e))
 
         full_new_ou_dn = ldb.Dn(samdb, str(full_old_ou_dn))
         full_new_ou_dn.remove_base_components(len(full_old_ou_dn) - 1)
@@ -203,7 +203,7 @@ class cmd_create(Command):
         try:
             full_ou_dn = samdb.normalize_dn_in_domain(ou_dn)
         except Exception as e:
-            raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e.message))
+            raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e))
 
         try:
             samdb.create_ou(full_ou_dn, description=description)
@@ -255,7 +255,7 @@ class cmd_listobjects(Command):
         try:
             full_ou_dn = samdb.normalize_dn_in_domain(ou_dn)
         except Exception as e:
-            raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e.message))
+            raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e))
 
         minchilds = 0
         scope = ldb.SCOPE_ONELEVEL
@@ -369,7 +369,7 @@ class cmd_delete(Command):
         try:
             full_ou_dn = samdb.normalize_dn_in_domain(ou_dn)
         except Exception as e:
-            raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e.message))
+            raise CommandError('Invalid ou_dn "%s": %s' % (ou_dn, e))
 
         controls = []
         if force_subtree_delete:
diff --git a/python/samba/netcmd/processes.py b/python/samba/netcmd/processes.py
index 6856985..d04a548 100644
--- a/python/samba/netcmd/processes.py
+++ b/python/samba/netcmd/processes.py
@@ -24,9 +24,6 @@
 # Useful for a quick 'syntax check' of a configuration file.
 #
 
-import os
-import sys
-
 import samba
 import samba.getopt as options
 from samba.netcmd import Command, CommandError, Option
diff --git a/python/samba/netcmd/rodc.py b/python/samba/netcmd/rodc.py
index 0606833..5839bdd 100644
--- a/python/samba/netcmd/rodc.py
+++ b/python/samba/netcmd/rodc.py
@@ -83,7 +83,6 @@ class cmd_rodc_preload(Command):
     def run(self, *accounts, **kwargs):
         sambaopts = kwargs.get("sambaopts")
         credopts = kwargs.get("credopts")
-        versionpts = kwargs.get("versionopts")
         server = kwargs.get("server")
         accounts_file = kwargs.get("file")
         ignore_errors = kwargs.get("ignore_errors")
diff --git a/python/samba/netcmd/spn.py b/python/samba/netcmd/spn.py
index 62884a4..f006946 100644
--- a/python/samba/netcmd/spn.py
+++ b/python/samba/netcmd/spn.py
@@ -58,8 +58,6 @@ class cmd_spn_list(Command):
             scope=ldb.SCOPE_SUBTREE, attrs=["servicePrincipalName"])
         if len(res) > 0:
             spns = res[0].get("servicePrincipalName")
-            found = False
-            flag = ldb.FLAG_MOD_ADD
             if spns is not None:
                 self.outf.write(
                     "User %s has the following servicePrincipalName: \n" %
diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py
index 2b1410b..0b8314d 100644
--- a/python/samba/netcmd/user.py
+++ b/python/samba/netcmd/user.py
@@ -2083,9 +2083,10 @@ samba-tool user syncpasswords --terminate \\
                         break
                     time.sleep(1)
                 if not got_exclusive:
-                    log_msg("update_pid(%r): failed to get exclusive lock[%s] - %s" %
+                    log_msg("update_pid(%r): failed to get exclusive lock[%s]" %
                             (pid, self.lockfile))
-                    raise CommandError("update_pid(%r): failed to get exclusive lock[%s] after 5 seconds" %
+                    raise CommandError("update_pid(%r): failed to get "
+                                       "exclusive lock[%s] after 5 seconds" %
                                        (pid, self.lockfile))
 
                 if pid is not None:
@@ -2616,7 +2617,7 @@ class cmd_user_move(Command):
             full_new_parent_dn = samdb.normalize_dn_in_domain(new_parent_dn)
         except Exception as e:
             raise CommandError('Invalid new_parent_dn "%s": %s' %
-                               (new_parent_dn, e.message))
+                               (new_parent_dn, e))
 
         full_new_user_dn = ldb.Dn(samdb, str(user_dn))
         full_new_user_dn.remove_base_components(len(user_dn) - 1)
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py
index d9cab25..1b7762eb 100644
--- a/python/samba/provision/__init__.py
+++ b/python/samba/provision/__init__.py
@@ -77,7 +77,6 @@ from samba.ms_display_specifiers import read_ms_ldif
 from samba.ntacls import setntacl, getntacl, dsacl2fsacl
 from samba.ndr import ndr_pack, ndr_unpack
 from samba.provision.backend import (
-    ExistingBackend,
     FDSBackend,
     LDBBackend,
     OpenLDAPBackend,
@@ -615,7 +614,9 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
     if dnsdomain is None:
         dnsdomain = lp.get("realm")
         if dnsdomain is None or dnsdomain == "":
-            raise ProvisioningError("guess_names: 'realm' not specified in supplied %s!", lp.configfile)
+            raise ProvisioningError(
+                "guess_names: 'realm' not specified in supplied %s!" %
+                lp.configfile)
 
     dnsdomain = dnsdomain.lower()
 
@@ -1750,7 +1751,9 @@ def check_dir_acl(path, acl, lp, domainsid, direct_db_access):
             fsacl = getntacl(lp, os.path.join(root, name),
                              direct_db_access=direct_db_access, service=SYSVOL_SERVICE)
             if fsacl is None:
-                raise ProvisioningError('%s ACL on GPO file %s %s not found!' % (acl_type(direct_db_access), os.path.join(root, name)))
+                raise ProvisioningError('%s ACL on GPO file %s not found!' %
+                                        (acl_type(direct_db_access),
+                                         os.path.join(root, name)))
             fsacl_sddl = fsacl.as_sddl(domainsid)
             if fsacl_sddl != acl:
                 raise ProvisioningError('%s ACL on GPO file %s %s does not match expected value %s from GPO object' % (acl_type(direct_db_access), os.path.join(root, name), fsacl_sddl, acl))
@@ -1759,7 +1762,9 @@ def check_dir_acl(path, acl, lp, domainsid, direct_db_access):
             fsacl = getntacl(lp, os.path.join(root, name),
                              direct_db_access=direct_db_access, service=SYSVOL_SERVICE)
             if fsacl is None:
-                raise ProvisioningError('%s ACL on GPO directory %s %s not found!' % (acl_type(direct_db_access), os.path.join(root, name)))
+                raise ProvisioningError('%s ACL on GPO directory %s not found!'
+                                        % (acl_type(direct_db_access),
+                                           os.path.join(root, name)))
             fsacl_sddl = fsacl.as_sddl(domainsid)
             if fsacl_sddl != acl:
                 raise ProvisioningError('%s ACL on GPO directory %s %s does not match expected value %s from GPO object' % (acl_type(direct_db_access), os.path.join(root, name), fsacl_sddl, acl))
@@ -2237,13 +2242,6 @@ def provision(logger, session_info, smbconf=None,
         provision_backend = LDBBackend(backend_type, paths=paths,
                                        lp=lp,
                                        names=names, logger=logger)
-    elif backend_type == "existing":
-        # If support for this is ever added back, then the URI will need to be
-        # specified again
-        provision_backend = ExistingBackend(backend_type, paths=paths,
-                                            lp=lp,


-- 
Samba Shared Repository



More information about the samba-cvs mailing list