The branch, master has been updated via adf73d3 pytests/samba3sam: unshadow and fix a search_non_mapped test via 654cc08 python/tests/ou: unshadow a test via add4068 samba-tool tests: fix bytes/str issue in masked test via 99be8e9 python/tests/raw_protocol: reveal shadowed test via disambiguation via 3117279 s4/dsdb/pytest/ldap_schema: remove duplicate test via d2fadfd ldb/tests/py/api: reveal shadowed casefold test via d042a30 python/tests/kcc_utils: disambiguate/unshadow a test via 03f4565 python/tests/lsa_string: remove duplicate method via f12fd90 python/gp_parse/gp_inf: remove unused variables via bab4f3a python/gp_parse/gp_inf: remove shadowed method via 105e14c s4/scripting/demodirsync: fix syntax error via 6ab7a3b s4/scripting: py3 style 0o123 octal, not 0123 via 4fdccc0 s4/dsdb/pytest/sort: use compat.cmp_fn instead of cmp via d121c68 s4/dsdb/pytest/ad_dc_medley: do not use xrange via 41844d1 s4/dsdb/pytests: Py3 compatitble except clauses via cd5ac17 script/show_test_time: approach python 3 compatibility via 159fdcb python/kcc: use compat.cmp_fn (PY3) via d6072cb python/remove_dc: use a local variable in offline_remove_server via 71825bc python/samba/common: py3 compat raw_input via bc8201b samba-tool ldapcmp: use ValueError, not obsolete StandardError via 2412ca5 python tests: always use Python's unicodedata via a1450f2 pytest/dcerpc.integer: force py2 long int without incompatible syntax via 91bab6f s4/selftest/tests: don't use import * via 9f7247d s3/selftest/tests: don't use import * via 8818b21 selftest/tests.py: avoid import * via c9c3a9c python/tests/common: avoid import * via aff2afd selftest/perftests: avoid import * via bbf1740 python/tests/kcc_*: avoid * imports via b90b2fc python/tests/kcc.graph: avoid import * via e9a57a5 s4/scripting/pfm_verify: remove duplicate import via da9fe70 samba-tool: samba.getopt is not used here via 3d5ba7f auth/cred/tests/bind: remove unused import via 86aca4d s4/dsdb/pytest/: unused imports via 682b223 s4/dsdb/pytest/dsdb_schema_info: do not double import via 742c786 s4/dsdb/pytest/dirsync: do not double import via ff1bff9 py/tests: remove unused imports via cb2c584 tests/blackbox/py: remove unused imports via 87272cf tdb/test/_tdbtext: remove unused imports via 02ed259 talloc/test/pytalloc: remove unused imports via eef11c4 ldb/tests/_ldb_text: remove unused imports via 6b88685 ldb-samba/tests/match-rules: remove unused imports via dd99bfd wintest/test-s3: remove unused imports via 5773290a script/generate_param.py: remove unused imports via 68b284f python/tests: remove unused imports via 135a3c2 python/tests/samdb: avoid useless local variable via b9161e5 python/tests/*: remove unused imports via eac8523 python/tests/netbios: remove unused imports via 4fc99a0 python/tests/getdcname: remove unused imports via 0c18c37 python/tests/dsdb_schema_attr: remove unused/duplicate imports via 018c013 python/tests/dns*: remove unused imports via f5df55d python/provision: remove unused imports via 1ecdde4 python/gp_parse/gp_pol: remove unused import via 9d24ded python/schema: remove unused import via 8519502 python/ntacls: remove unused imports via 74a5448 python/gp_ext_loader: remove unused imports via daea7c1 python/forest_update: remove unused imports via db6ab2c python/domain_update: remove unused imports via fe6daff samba-tool domain: remove unused imports via c3b5326 samba-tool user: remove unused import via ca40183 samba-tool ldapcmp: remove unused import via 24a3acb samba-tool drs: remove duplicate and unused imports via 2ce9890 python/tests/__init__: import what we need via 3f56dc1 python/tests/gpo: import what we need (errno, not gp_log) via b3e913e python/tests/unix: fix spelling and import of text_type from a03804c s3:smbd: Move a variable declaration closer to its use
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit adf73d34a3e51c2a3ce93f144cd898423e190236 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Fri Oct 12 11:52:49 2018 +1300 pytests/samba3sam: unshadow and fix a search_non_mapped test Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> Autobuild-User(master): Noel Power <npo...@samba.org> Autobuild-Date(master): Fri Oct 26 00:50:37 CEST 2018 on sn-devel-144 commit 654cc08cf0e31478463bb4bfdc95623a990ac88d Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:45:58 2018 +1300 python/tests/ou: unshadow a test Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit add4068fb79c0459e94edcc7fd001adc514509cb Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 25 11:40:53 2018 +1300 samba-tool tests: fix bytes/str issue in masked test This test will be revealed to the world in the next commit. Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 99be8e9871c8730ef71f4ac18133003d221f8b22 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:42:40 2018 +1300 python/tests/raw_protocol: reveal shadowed test via disambiguation Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 311727947799e896e05d644103c9db80a665de88 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 17:00:46 2018 +1300 s4/dsdb/pytest/ldap_schema: remove duplicate test The tests differ in two lines, thus: def test_subClassOf(self): - """ Testing usage of custom child schamaClass + """ Testing usage of custom child classSchema [...] -governsId: 1.3.6.1.4.1.7165.4.6.2.6.3.""" + str(random.randint(1, 100000)) + """ +governsId: 1.3.6.1.4.1.7165.4.6.2.6.7.""" + str(random.randint(1, 100000)) + """ with the governsId OID changed because it was noticed they were colliding. Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit d2fadfd6e45de60ef78e29a9dd359ff3f3bfe778 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:47:44 2018 +1300 ldb/tests/py/api: reveal shadowed casefold test Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit d042a300391478b72c763bd2e16228ba8a75c266 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:15:43 2018 +1300 python/tests/kcc_utils: disambiguate/unshadow a test Pair-programmed-with: Garming Sam <garm...@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 03f45656fd298a7569a08ab4bb7feaff36780a39 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:50:06 2018 +1300 python/tests/lsa_string: remove duplicate method Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit f12fd900db6e761bf4faf9f6c24c335b97830849 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 25 22:34:31 2018 +1300 python/gp_parse/gp_inf: remove unused variables Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit bab4f3a129eac6d701112968e63f195407583f28 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:23:01 2018 +1300 python/gp_parse/gp_inf: remove shadowed method The 'from_xml()' definition is replaced a few lines down Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 105e14cbd1865578bdaad150f2254ceed88abab1 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 18:33:48 2018 +1300 s4/scripting/demodirsync: fix syntax error Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 6ab7a3beb36b9b5e4f2e24835558ddcf765aafae Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 18:32:52 2018 +1300 s4/scripting: py3 style 0o123 octal, not 0123 this works with py2.6+ too. Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 4fdccc0d35f0d009e07a9b08edc34dc0fb37c89c Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 17:23:54 2018 +1300 s4/dsdb/pytest/sort: use compat.cmp_fn instead of cmp Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <noel.po...@suse.com> commit d121c68a4b27314f8eb4ed1da7ed24f72cd8e814 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 17:06:32 2018 +1300 s4/dsdb/pytest/ad_dc_medley: do not use xrange Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 41844d13fe9c5749b04dc5fede0b9f4fcc0d8df2 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:52:14 2018 +1300 s4/dsdb/pytests: Py3 compatitble except clauses Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit cd5ac17654467531e2dde85a738c5a170277f841 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:04:38 2018 +1300 script/show_test_time: approach python 3 compatibility Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 159fdcb6010020b06e5a55b66c3e72071183152d Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:37:28 2018 +1300 python/kcc: use compat.cmp_fn (PY3) Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit d6072cbf9808723e1054f3533371aac078a6dd08 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:07:30 2018 +1300 python/remove_dc: use a local variable in offline_remove_server Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 71825bc9aacc05b14b303c6fa92a1dc127666bd1 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:52:09 2018 +1300 python/samba/common: py3 compat raw_input Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit bc8201bdf46f487e88812e6adc7b3d2d66a2c900 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:40:09 2018 +1300 samba-tool ldapcmp: use ValueError, not obsolete StandardError The error is in the value, and StandardError is not in Python 3 Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 2412ca517da36e660c685a8ac001118775672a52 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Wed Oct 24 15:56:20 2018 +1300 python tests: always use Python's unicodedata We had our own special version with very few entries, but only used it in one place. Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit a1450f2c0fc280c3d01b46333546955cfd9261b7 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 18:31:09 2018 +1300 pytest/dcerpc.integer: force py2 long int without incompatible syntax Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 91bab6f8980433aa4ddefe1b264264723ee3daf2 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:52:28 2018 +1300 s4/selftest/tests: don't use import * Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 9f7247d84699519a5817de5c498058a844b4536e Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:51:23 2018 +1300 s3/selftest/tests: don't use import * Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 8818b21ea544e675a6922ee896fb8d2258017168 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:05:23 2018 +1300 selftest/tests.py: avoid import * Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit c9c3a9ce9136e0318a127470b6e234948ce2e2ce Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:40:59 2018 +1300 python/tests/common: avoid import * Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit aff2afd46ef92b8733185a3b02ef0fec54b9c4fe Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:05:11 2018 +1300 selftest/perftests: avoid import * Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit bbf1740b33d133ace54258122ad858c5f275046e Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:51:55 2018 +1300 python/tests/kcc_*: avoid * imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit b90b2fcda81449f653f90d5f96ce8c1a603f251a Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:44:02 2018 +1300 python/tests/kcc.graph: avoid import * Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit e9a57a5b014eaa41a2ac6405b10e37313341d26a Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 18:33:23 2018 +1300 s4/scripting/pfm_verify: remove duplicate import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit da9fe70da7a166b65d7789ef357f27d94bfc15e8 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:34:53 2018 +1300 samba-tool: samba.getopt is not used here Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 3d5ba7fcfa093f96c883bb99ca218857ba0def8b Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 18:25:53 2018 +1300 auth/cred/tests/bind: remove unused import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 86aca4dbf8e5f20d45b10eae52a6278cca2d3364 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 17:24:22 2018 +1300 s4/dsdb/pytest/: unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 682b223d8383e89bb9656ca7d60d68a6adc59e2a Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 17:07:22 2018 +1300 s4/dsdb/pytest/dsdb_schema_info: do not double import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 742c786d74a70852d10dc025ff42899257127783 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 17:07:05 2018 +1300 s4/dsdb/pytest/dirsync: do not double import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit ff1bff9e8ba40cdbbbdf5489b3dcad34883f0192 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:50:49 2018 +1300 py/tests: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit cb2c5843bc2c2eac8250588a0d29c0532d784eea Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:50:17 2018 +1300 tests/blackbox/py: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 87272cf17e506e601daab4b632bf527e58939274 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:49:47 2018 +1300 tdb/test/_tdbtext: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 02ed259942bdc70d47b09adc31b7658c023b06cd Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:49:05 2018 +1300 talloc/test/pytalloc: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit eef11c4479510f992d6a6dee1f3173d592183740 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:47:11 2018 +1300 ldb/tests/_ldb_text: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 6b88685f6baa15221378c579c8dfded9505fa351 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:46:44 2018 +1300 ldb-samba/tests/match-rules: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit dd99bfd866ad5b00caec6085094cd6ef4d40a23d Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:05:57 2018 +1300 wintest/test-s3: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 5773290a6f011b5a3408c6f34f791cebfb4bfac2 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 16:04:00 2018 +1300 script/generate_param.py: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 68b284f690d550f1772eb6111387b515ddfea138 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:33:49 2018 +1300 python/tests: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 135a3c2944f140c5c2e2a996df12942f6eda7994 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:00:30 2018 +1300 python/tests/samdb: avoid useless local variable Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit b9161e52605b7ad1595ed13f3b7f48145b1d3d25 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:58:50 2018 +1300 python/tests/*: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit eac85232e2dafdcc579174b184ef42db191e167c Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:50:43 2018 +1300 python/tests/netbios: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 4fc99a04d21b950ed7bd8b8cf27303759f29b92f Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:45:54 2018 +1300 python/tests/getdcname: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 0c18c3738a2e104b0bdf5eb99e8edb188e1f7172 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:44:45 2018 +1300 python/tests/dsdb_schema_attr: remove unused/duplicate imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 018c0138c224dc3aa3782dfaed9080d9f25fc578 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:42:10 2018 +1300 python/tests/dns*: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit f5df55d24412fda9f3d85b82da0a62ab8c86b9f1 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:39:06 2018 +1300 python/provision: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 1ecdde4f102711d0faec31047fec58d2e930595b Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:23:35 2018 +1300 python/gp_parse/gp_pol: remove unused import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 9d24ded27da4675092740ef59f9c293be8e5a435 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:10:33 2018 +1300 python/schema: remove unused import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 8519502cb589e0feb270cd15d0b1413690507eb2 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:06:40 2018 +1300 python/ntacls: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 74a5448bd0464173353971ac158c732a46006649 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:05:32 2018 +1300 python/gp_ext_loader: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit daea7c1b2c2f0fe2d231823471a3925dd903b6b4 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:57:15 2018 +1300 python/forest_update: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit db6ab2cf6f19b5f3bd656a2bece73960368cf5d2 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:55:41 2018 +1300 python/domain_update: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit fe6daff22a3f39c4ded9be109c8ed384ab8bc5de Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:45:54 2018 +1300 samba-tool domain: remove unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit c3b53264cc560789d243be51fa8df406085f09b5 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:41:28 2018 +1300 samba-tool user: remove unused import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit ca40183d0c552e601c69b427470403302cd2bd3d Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:38:58 2018 +1300 samba-tool ldapcmp: remove unused import Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 24a3acb248e7f886e9024d6d423d259d16babb63 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 12:37:36 2018 +1300 samba-tool drs: remove duplicate and unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 2ce9890126332d89c4af46157b4793ca6dc12199 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:49:05 2018 +1300 python/tests/__init__: import what we need Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit 3f56dc1a1fa59334f37ce0ab372278094624eaee Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 13:47:22 2018 +1300 python/tests/gpo: import what we need (errno, not gp_log) Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> commit b3e913ed74c3b794e7cc0c909f18eaaae92398ce Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu Oct 11 14:43:29 2018 +1300 python/tests/unix: fix spelling and import of text_type Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Noel Power <npo...@samba.org> ----------------------------------------------------------------------- Summary of changes: auth/credentials/tests/bind.py | 1 - lib/ldb-samba/tests/match_rules.py | 4 -- lib/ldb/_ldb_text.py | 3 -- lib/ldb/tests/python/api.py | 2 +- lib/talloc/test_pytalloc.py | 1 - lib/tdb/_tdb_text.py | 1 - python/samba/common.py | 2 + python/samba/domain_update.py | 13 ----- python/samba/forest_update.py | 13 ----- python/samba/gp_ext_loader.py | 1 - python/samba/gp_parse/gp_inf.py | 11 ---- python/samba/gp_parse/gp_pol.py | 1 - python/samba/kcc/__init__.py | 4 +- python/samba/netcmd/__init__.py | 1 - python/samba/netcmd/domain.py | 6 +-- python/samba/netcmd/domain_backup.py | 1 - python/samba/netcmd/drs.py | 2 - python/samba/netcmd/group.py | 1 - python/samba/netcmd/ldapcmp.py | 2 +- python/samba/netcmd/user.py | 1 - python/samba/ntacls.py | 1 - python/samba/provision/__init__.py | 1 - python/samba/provision/backend.py | 5 +- python/samba/remove_dc.py | 10 ++-- python/samba/schema.py | 1 - python/samba/tests/__init__.py | 6 +-- python/samba/tests/blackbox/check_output.py | 1 - python/samba/tests/blackbox/samba_dnsupdate.py | 1 - python/samba/tests/common.py | 2 +- python/samba/tests/dcerpc/integer.py | 8 ++- python/samba/tests/dcerpc/raw_protocol.py | 2 +- python/samba/tests/dcerpc/raw_testcase.py | 1 - python/samba/tests/dcerpc/unix.py | 4 +- python/samba/tests/dns.py | 1 - python/samba/tests/dns_forwarder.py | 1 - python/samba/tests/dns_forwarder_helpers/server.py | 2 - python/samba/tests/dns_invalid.py | 11 +--- python/samba/tests/dns_tkey.py | 9 +--- python/samba/tests/dsdb_schema_attributes.py | 3 -- python/samba/tests/getdcname.py | 3 -- python/samba/tests/gpo.py | 3 +- python/samba/tests/kcc/graph.py | 5 +- python/samba/tests/kcc/graph_utils.py | 8 ++- python/samba/tests/kcc/kcc_utils.py | 6 ++- python/samba/tests/kcc/ldif_import_export.py | 2 - python/samba/tests/lsa_string.py | 9 ---- python/samba/tests/netbios.py | 2 - python/samba/tests/ntlmdisabled.py | 1 - python/samba/tests/password_quality.py | 2 +- python/samba/tests/password_test.py | 1 - python/samba/tests/s3idmapdb.py | 3 +- python/samba/tests/s3param.py | 2 +- python/samba/tests/s3passdb.py | 2 +- python/samba/tests/s3registry.py | 3 +- python/samba/tests/s3windb.py | 2 +- python/samba/tests/samba3sam.py | 4 +- python/samba/tests/samba_tool/ou.py | 4 +- python/samba/tests/samdb.py | 2 - python/samba/tests/strings.py | 12 ++--- python/samba/tests/unicodenames.py | 28 ----------- script/generate_param.py | 4 -- script/show_test_time | 6 +-- selftest/perf_tests.py | 3 +- selftest/tests.py | 7 ++- source3/selftest/tests.py | 8 ++- .../dsdb/tests/python/ad_dc_medley_performance.py | 5 +- source4/dsdb/tests/python/dirsync.py | 2 +- source4/dsdb/tests/python/dsdb_schema_info.py | 1 - source4/dsdb/tests/python/ldap_schema.py | 58 ---------------------- source4/dsdb/tests/python/passwords.py | 9 ++-- source4/dsdb/tests/python/sort.py | 6 +-- source4/scripting/devel/config_base | 2 +- source4/scripting/devel/demodirsync.py | 2 +- source4/scripting/devel/pfm_verify.py | 1 - source4/selftest/tests.py | 9 +++- source4/torture/drs/python/getnc_exop.py | 1 - .../torture/drs/python/linked_attributes_drs.py | 1 - wintest/test-s3.py | 3 -- 78 files changed, 99 insertions(+), 274 deletions(-) delete mode 100644 python/samba/tests/unicodenames.py Changeset truncated at 500 lines: diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py index 7e0e19f..97003f5 100755 --- a/auth/credentials/tests/bind.py +++ b/auth/credentials/tests/bind.py @@ -7,7 +7,6 @@ import optparse import sys import base64 import copy -import time sys.path.insert(0, "bin/python") import samba diff --git a/lib/ldb-samba/tests/match_rules.py b/lib/ldb-samba/tests/match_rules.py index f36c9fb..ad8ed31 100755 --- a/lib/ldb-samba/tests/match_rules.py +++ b/lib/ldb-samba/tests/match_rules.py @@ -3,17 +3,13 @@ import optparse import sys import os -import unittest import samba import samba.getopt as options from samba.tests.subunitrun import SubunitOptions, TestProgram -from samba.tests import delete_force -from samba.dcerpc import security, misc from samba.samdb import SamDB from samba.auth import system_session -from samba.ndr import ndr_unpack from ldb import Message, MessageElement, Dn, LdbError from ldb import FLAG_MOD_ADD, FLAG_MOD_REPLACE, FLAG_MOD_DELETE from ldb import SCOPE_BASE, SCOPE_SUBTREE, SCOPE_ONELEVEL diff --git a/lib/ldb/_ldb_text.py b/lib/ldb/_ldb_text.py index 65d603b..e0505e1 100644 --- a/lib/ldb/_ldb_text.py +++ b/lib/ldb/_ldb_text.py @@ -3,9 +3,6 @@ # Copyright (C) 2015 Petr Viktorin <pvikt...@redhat.com> # Published under the GNU LGPLv3 or later -import sys -import functools - import ldb diff --git a/lib/ldb/tests/python/api.py b/lib/ldb/tests/python/api.py index f9e2fa5..0e16004 100755 --- a/lib/ldb/tests/python/api.py +++ b/lib/ldb/tests/python/api.py @@ -2062,7 +2062,7 @@ class DnTests(TestCase): x = ldb.Dn(self.ldb, "dc=foo13,bla=blie") self.assertEqual(x.__repr__(), "Dn('dc=foo13,bla=blie')") - def test_get_casefold(self): + def test_get_casefold_2(self): x = ldb.Dn(self.ldb, "dc=foo14,bar=bloe") self.assertEqual(x.get_casefold(), "DC=FOO14,BAR=bloe") diff --git a/lib/talloc/test_pytalloc.py b/lib/talloc/test_pytalloc.py index 1acb96b..43b09df 100644 --- a/lib/talloc/test_pytalloc.py +++ b/lib/talloc/test_pytalloc.py @@ -5,7 +5,6 @@ import unittest import subprocess import sys -import re import gc import talloc diff --git a/lib/tdb/_tdb_text.py b/lib/tdb/_tdb_text.py index c823bf8..f3caa53 100644 --- a/lib/tdb/_tdb_text.py +++ b/lib/tdb/_tdb_text.py @@ -4,7 +4,6 @@ # Published under the GNU LGPLv3 or later import sys -import functools import tdb diff --git a/python/samba/common.py b/python/samba/common.py index fabbcea..76d00e3 100644 --- a/python/samba/common.py +++ b/python/samba/common.py @@ -31,6 +31,8 @@ if PY3: def cmp(a, b): return (a > b) - (a < b) + raw_input = input + def confirm(msg, forced=False, allow_all=False): """confirm an action with the user diff --git a/python/samba/domain_update.py b/python/samba/domain_update.py index d21ea38..ae5446a 100644 --- a/python/samba/domain_update.py +++ b/python/samba/domain_update.py @@ -16,29 +16,16 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import re import ldb import samba -import time from base64 import b64encode -from samba import dsdb -from samba import common from samba import sd_utils -from samba.dcerpc import misc -from samba.dcerpc import drsuapi from samba.ndr import ndr_unpack, ndr_pack -from samba.dcerpc import drsblobs -from samba.common import dsdb_Dn from samba.dcerpc import security from samba.dcerpc.security import SECINFO_DACL from samba.descriptor import ( - get_wellknown_sds, - get_diff_sds, get_managed_service_accounts_descriptor, ) -from samba.auth import system_session, admin_session -from samba.netcmd import CommandError -from samba.netcmd.fsmo import get_fsmo_roleowner from samba.dsdb import ( DS_DOMAIN_FUNCTION_2008, DS_DOMAIN_FUNCTION_2008_R2, diff --git a/python/samba/forest_update.py b/python/samba/forest_update.py index 985e9f9..65db1e3 100644 --- a/python/samba/forest_update.py +++ b/python/samba/forest_update.py @@ -16,25 +16,12 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import re import ldb import samba -import time -from base64 import b64decode -from samba import dsdb -from samba import common from samba import sd_utils -from samba.dcerpc import misc -from samba.dcerpc import drsuapi from samba.ndr import ndr_unpack, ndr_pack -from samba.dcerpc import drsblobs -from samba.common import dsdb_Dn from samba.dcerpc import security from samba.dcerpc.security import SECINFO_DACL -from samba.descriptor import get_wellknown_sds, get_diff_sds -from samba.auth import system_session, admin_session -from samba.netcmd import CommandError -from samba.netcmd.fsmo import get_fsmo_roleowner from samba.provision.common import setup_path from samba.dsdb import ( DS_DOMAIN_FUNCTION_2008, diff --git a/python/samba/gp_ext_loader.py b/python/samba/gp_ext_loader.py index 89ce4fa..29a265e 100644 --- a/python/samba/gp_ext_loader.py +++ b/python/samba/gp_ext_loader.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import os from samba.gpclass import list_gp_extensions from samba.gpclass import gp_ext diff --git a/python/samba/gp_parse/gp_inf.py b/python/samba/gp_parse/gp_inf.py index 4d39cb0..e4bed26 100644 --- a/python/samba/gp_parse/gp_inf.py +++ b/python/samba/gp_parse/gp_inf.py @@ -162,7 +162,6 @@ class GptTmplInfParser(GPParser): # param_list = [[Name, Mode, ACL],] def parse(self, line): parameters = [None, None, None] - index = 0 current_arg = 0 while line != '': @@ -186,15 +185,6 @@ class GptTmplInfParser(GPParser): # print line self.param_list.append(parameters) - def from_xml(self, section): - for param in section.findall('Parameter'): - key = param.find('Key').text - value = param.find('Value').text - if value is None: - value = '' - - self.param_list.append((key, value)) - def write_section(self, header, fp): if len(self.param_list) == 0: return @@ -333,7 +323,6 @@ class GptTmplInfParser(GPParser): header_name = match.group(1) if header_name in self.sections: current_param_parser = self.sections[header_name] - current_header_name = header_name # print current_param_parser continue diff --git a/python/samba/gp_parse/gp_pol.py b/python/samba/gp_parse/gp_pol.py index bebca06..5635747 100644 --- a/python/samba/gp_parse/gp_pol.py +++ b/python/samba/gp_parse/gp_pol.py @@ -17,7 +17,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import codecs import base64 from xml.etree.ElementTree import Element, SubElement diff --git a/python/samba/kcc/__init__.py b/python/samba/kcc/__init__.py index 5e1762d..6c6c202 100644 --- a/python/samba/kcc/__init__.py +++ b/python/samba/kcc/__init__.py @@ -44,7 +44,7 @@ from samba.kcc.graph import Vertex from samba.kcc.debug import DEBUG, DEBUG_FN, logger from samba.kcc import debug -from samba.compat import text_type +from samba.compat import cmp_fn def sort_dsa_by_gc_and_guid(dsa1, dsa2): @@ -61,7 +61,7 @@ def sort_dsa_by_gc_and_guid(dsa1, dsa2): return -1 if not dsa1.is_gc() and dsa2.is_gc(): return +1 - return cmp(ndr_pack(dsa1.dsa_guid), ndr_pack(dsa2.dsa_guid)) + return cmp_fn(ndr_pack(dsa1.dsa_guid), ndr_pack(dsa2.dsa_guid)) def is_smtp_replication_available(): diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 57436c7..d73ffe9 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -18,7 +18,6 @@ import optparse import samba -from samba import getopt as options from samba import colour from samba.logger import get_samba_logger from ldb import LdbError diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index c671a76..a85c16a 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -45,7 +45,7 @@ import samba.ntacls from samba.join import join_RODC, join_DC, join_subdomain from samba.auth import system_session from samba.samdb import SamDB, get_default_backend_store -from samba.ndr import ndr_unpack, ndr_pack, ndr_print +from samba.ndr import ndr_pack, ndr_print from samba.dcerpc import drsuapi from samba.dcerpc import drsblobs from samba.dcerpc import lsa @@ -65,9 +65,7 @@ from samba.netcmd.common import netcmd_get_domain_infos_via_cldap from samba.samba3 import Samba3 from samba.samba3 import param as s3param from samba.upgrade import upgrade_from_samba3 -from samba.drs_utils import ( - sendDsReplicaSync, drsuapi_connect, drsException, - sendRemoveDsServer) +from samba.drs_utils import drsuapi_connect from samba import remove_dc, arcfour_encrypt, string_to_byte_array from samba.dsdb import ( diff --git a/python/samba/netcmd/domain_backup.py b/python/samba/netcmd/domain_backup.py index 9f4486b..c4f2045 100644 --- a/python/samba/netcmd/domain_backup.py +++ b/python/samba/netcmd/domain_backup.py @@ -49,7 +49,6 @@ from samba.provision.sambadns import (fill_dns_data_partitions, from samba.tdb_util import tdb_copy from samba.mdb_util import mdb_copy import errno -import tdb from subprocess import CalledProcessError from samba import sites diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py index 0b2ed37..c937c70 100644 --- a/python/samba/netcmd/drs.py +++ b/python/samba/netcmd/drs.py @@ -37,8 +37,6 @@ from samba.samdb import SamDB from samba import drs_utils, nttime2string, dsdb from samba.dcerpc import drsuapi, misc from samba.join import join_clone -from samba.ndr import ndr_unpack -from samba.dcerpc import drsblobs from samba import colour from samba.uptodateness import ( diff --git a/python/samba/netcmd/group.py b/python/samba/netcmd/group.py index 5158357..82d215f 100644 --- a/python/samba/netcmd/group.py +++ b/python/samba/netcmd/group.py @@ -22,7 +22,6 @@ import ldb from samba.ndr import ndr_unpack from samba.dcerpc import security -from getpass import getpass from samba.auth import system_session from samba.samdb import SamDB from samba.dsdb import ( diff --git a/python/samba/netcmd/ldapcmp.py b/python/samba/netcmd/ldapcmp.py index 6508a8f..312c8ec 100644 --- a/python/samba/netcmd/ldapcmp.py +++ b/python/samba/netcmd/ldapcmp.py @@ -854,7 +854,7 @@ class LDAPBundel(object): elif self.search_scope == "ONE": self.search_scope = SCOPE_ONELEVEL else: - raise StandardError("Wrong 'scope' given. Choose from: SUB, ONE, BASE") + raise ValueError("Wrong 'scope' given. Choose from: SUB, ONE, BASE") try: res = self.con.ldb.search(base=self.search_base, scope=self.search_scope, attrs=["dn"]) except LdbError as e3: diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index ab3d13d..87726d4 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -24,7 +24,6 @@ import os import re import tempfile import difflib -import sys import fcntl import signal import errno diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py index 838152a..6ac5a38 100644 --- a/python/samba/ntacls.py +++ b/python/samba/ntacls.py @@ -32,7 +32,6 @@ from samba.samba3 import param as s3param from samba.dcerpc import security, xattr, idmap from samba.ndr import ndr_pack, ndr_unpack from samba.samba3 import smbd -from samba.auth import admin_session from samba import smb # don't include volumes diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py index cc7b8ba..d9cab25 100644 --- a/python/samba/provision/__init__.py +++ b/python/samba/provision/__init__.py @@ -40,7 +40,6 @@ import logging import time import uuid import socket -import string import tempfile import samba.dsdb diff --git a/python/samba/provision/backend.py b/python/samba/provision/backend.py index 005c153..2e3b1dc 100644 --- a/python/samba/provision/backend.py +++ b/python/samba/provision/backend.py @@ -26,18 +26,15 @@ """Functions for setting up a Samba configuration (LDB and LDAP backends).""" from samba.compat import urllib_quote -from base64 import b64encode import errno import ldb import os import sys -import uuid import time import shutil import subprocess -import urllib -from ldb import SCOPE_BASE, SCOPE_ONELEVEL, LdbError, timestring +from ldb import SCOPE_BASE, SCOPE_ONELEVEL, LdbError from samba import Ldb, read_and_sub_file, setup_file from samba.credentials import Credentials, DONT_USE_KERBEROS diff --git a/python/samba/remove_dc.py b/python/samba/remove_dc.py index a606270..e6b1b7b 100644 --- a/python/samba/remove_dc.py +++ b/python/samba/remove_dc.py @@ -229,15 +229,15 @@ def offline_remove_server(samdb, logger, scope=ldb.SCOPE_BASE, expression="(objectClass=server)") msg = msgs[0] - dc_name = str(msgs[0]["cn"][0]) + dc_name = str(msg["cn"][0]) try: - computer_dn = ldb.Dn(samdb, msgs[0]["serverReference"][0].decode('utf8')) + computer_dn = ldb.Dn(samdb, msg["serverReference"][0].decode('utf8')) except KeyError: computer_dn = None try: - dnsHostName = str(msgs[0]["dnsHostName"][0]) + dnsHostName = str(msg["dnsHostName"][0]) except KeyError: dnsHostName = None @@ -267,8 +267,8 @@ def offline_remove_server(samdb, logger, logger.info("Removing computer account: %s (and any child objects)" % computer_dn) samdb.delete(computer_dn, ["tree_delete:0"]) - if "dnsHostName" in msgs[0]: - dnsHostName = str(msgs[0]["dnsHostName"][0]) + if "dnsHostName" in msg: + dnsHostName = str(msg["dnsHostName"][0]) if remove_dns_account: res = samdb.search(expression="(&(objectclass=user)(cn=dns-%s)(servicePrincipalName=DNS/%s))" % diff --git a/python/samba/schema.py b/python/samba/schema.py index 6aa0ddb..b6c37bb 100644 --- a/python/samba/schema.py +++ b/python/samba/schema.py @@ -31,7 +31,6 @@ from samba.samdb import SamDB from samba.compat import get_string from samba import dsdb from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL -import os def get_schema_descriptor(domain_sid, name_map={}): diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index ca278b5..7957a1a 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -20,22 +20,20 @@ import os import tempfile +import warnings import ldb import samba from samba import param from samba import credentials from samba.credentials import Credentials from samba import gensec -import socket -import struct import subprocess import sys -import tempfile import unittest import re import samba.auth import samba.dcerpc.base -from samba.compat import PY3, text_type +from samba.compat import text_type from samba.compat import string_types from random import randint from random import SystemRandom diff --git a/python/samba/tests/blackbox/check_output.py b/python/samba/tests/blackbox/check_output.py index 3483a08..30f46ab 100644 --- a/python/samba/tests/blackbox/check_output.py +++ b/python/samba/tests/blackbox/check_output.py @@ -17,7 +17,6 @@ Blackbox tests for blackboxtest check output methods. """ -import time import signal from samba.tests import BlackboxTestCase diff --git a/python/samba/tests/blackbox/samba_dnsupdate.py b/python/samba/tests/blackbox/samba_dnsupdate.py index 1e0c164..3e206a4 100644 --- a/python/samba/tests/blackbox/samba_dnsupdate.py +++ b/python/samba/tests/blackbox/samba_dnsupdate.py @@ -24,7 +24,6 @@ from samba.auth import system_session from samba.samdb import SamDB import ldb import shutil -import os class SambaDnsUpdateTests(samba.tests.BlackboxTestCase): diff --git a/python/samba/tests/common.py b/python/samba/tests/common.py index 11510b6..13f3ba2 100644 --- a/python/samba/tests/common.py +++ b/python/samba/tests/common.py @@ -20,7 +20,7 @@ import samba import os import samba.tests -from samba.common import * +from samba.common import normalise_int32, dsdb_Dn from samba.samdb import SamDB -- Samba Shared Repository