]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
gp: Avoid shadowing import
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 24 Feb 2023 01:52:40 +0000 (14:52 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 3 Mar 2023 01:07:36 +0000 (01:07 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/gp/gpclass.py

index 68c1050f6326d3c26f6589ed2d134424deaf3cfd..93dc23c23be6b6fb1a4fadd0497051f0de55f332 100644 (file)
@@ -624,10 +624,10 @@ def check_refresh_gpo_list(dc_hostname, lp, creds, gpos):
     # Reset signing state
     creds.set_smb_signing(saved_signing_state)
     cache_path = lp.cache_path('gpo_cache')
-    for gpo in gpos:
-        if not gpo.file_sys_path:
+    for gpo_obj in gpos:
+        if not gpo_obj.file_sys_path:
             continue
-        cache_gpo_dir(conn, cache_path, check_safe_path(gpo.file_sys_path))
+        cache_gpo_dir(conn, cache_path, check_safe_path(gpo_obj.file_sys_path))
 
 
 def get_deleted_gpos_list(gp_db, gpos):
@@ -740,10 +740,10 @@ def rsop(lp, creds, store, gp_extensions, username, target):
     print('Resultant Set of Policy')
     print('%s Policy\n' % target)
     term_width = shutil.get_terminal_size(fallback=(120, 50))[0]
-    for gpo in gpos:
-        if gpo.display_name.strip() == 'Local Policy':
+    for gpo_obj in gpos:
+        if gpo_obj.display_name.strip() == 'Local Policy':
             continue # We never apply local policy
-        print('GPO: %s' % gpo.display_name)
+        print('GPO: %s' % gpo_obj.display_name)
         print('='*term_width)
         for ext in gp_extensions:
             ext = ext(lp, creds, username, store)
@@ -754,7 +754,7 @@ def rsop(lp, creds, store, gp_extensions, username, target):
                 cse_name = ext.__module__.split('.')[-1]
             print('  CSE: %s' % cse_name)
             print('  ' + ('-'*int(term_width/2)))
-            for section, settings in ext.rsop(gpo).items():
+            for section, settings in ext.rsop(gpo_obj).items():
                 print('    Policy Type: %s' % section)
                 print('    ' + ('-'*int(term_width/2)))
                 print(__rsop_vals(settings).lstrip('\n'))