py/gp_cert_auto_enroll_ext: avoid redundant iteration
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 5 May 2022 04:35:18 +0000 (16:35 +1200)
committerDavid Mulder <dmulder@samba.org>
Thu, 5 May 2022 13:42:32 +0000 (13:42 +0000)
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.bagnall@catalyst.net.nz>
Reviewed-by: David Mulder <dmulder@suse.com>
python/samba/gp_cert_auto_enroll_ext.py

index 7a9430212216ecdf9d2126c8a4bd018697cc8e84..31c67ccaf18c0db95f0976a977cd894b30a0b995 100644 (file)
@@ -389,9 +389,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: