The branch, master has been updated via e008c8f8303 python/gp_cert_auto_enroll: removed unused imports via 6d20b7fe2df py/gp_cert_auto_enroll_ext: avoid redundant iteration via 830193102df py/gp_cert_auto_enroll_ext: avoid shadowing loop variable from cda4db7d593 s3:tests: Reformat test_forceuser_validusers.sh
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit e008c8f8303d58cf34eb3fbeae76f0d10adb53b8 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu May 5 16:21:45 2022 +1200 python/gp_cert_auto_enroll: removed unused imports Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: David Mulder <dmul...@suse.com> Autobuild-User(master): David Mulder <dmul...@samba.org> Autobuild-Date(master): Thu May 5 14:39:50 UTC 2022 on sn-devel-184 commit 6d20b7fe2dfb66560fe573505671921f1076f100 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu May 5 16:35:18 2022 +1200 py/gp_cert_auto_enroll_ext: avoid redundant iteration self.__read_cep_data() does a 'for end_point_group in end_point_information:', and we don't need to do it outside Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: David Mulder <dmul...@suse.com> commit 830193102dfb360a8680df0b907b55a678a99093 Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Thu May 5 16:33:34 2022 +1200 py/gp_cert_auto_enroll_ext: avoid shadowing loop variable Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: David Mulder <dmul...@suse.com> ----------------------------------------------------------------------- Summary of changes: python/samba/gp_cert_auto_enroll_ext.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp_cert_auto_enroll_ext.py b/python/samba/gp_cert_auto_enroll_ext.py index b2903f3b7e0..e6c40462d33 100644 --- a/python/samba/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp_cert_auto_enroll_ext.py @@ -22,8 +22,7 @@ from ldb import SCOPE_SUBTREE, SCOPE_BASE from samba.auth import system_session from samba.gpclass import get_dc_hostname import base64 -from tempfile import NamedTemporaryFile -from shutil import move, which +from shutil import which from subprocess import Popen, PIPE import re from glob import glob @@ -366,10 +365,10 @@ class gp_cert_auto_enroll_ext(gp_pol_ext): if ca['URL'] == 'LDAP:': # This is a basic configuration. cas = fetch_certification_authorities(ldb) - for ca in cas: - data = cert_enroll(ca, ldb, trust_dir, private_dir) + for _ca in cas: + data = cert_enroll(_ca, ldb, trust_dir, private_dir) self.gp_db.store(str(self), - base64.b64encode(ca['name']).decode(), + base64.b64encode(_ca['name']).decode(), data) # If EndPoint.URI starts with "HTTPS//": elif ca['URL'].lower().startswith('https://'): @@ -389,9 +388,8 @@ class gp_cert_auto_enroll_ext(gp_pol_ext): end_point_information = obtain_end_point_information(entries) if len(end_point_information) > 0: - for end_point_group in end_point_information: - self.__read_cep_data(ldb, end_point_information, - trust_dir, private_dir) + self.__read_cep_data(ldb, end_point_information, + trust_dir, private_dir) else: cas = fetch_certification_authorities(ldb) for ca in cas: -- Samba Shared Repository