diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-02-13 14:53:54 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2023-05-16 23:29:32 +0000 |
commit | f9501f2ae4ecf0d98f28c43834c5f6cdb19f324f (patch) | |
tree | 996f46f2868370649a1b9311a7f4abe94692bbbd /python | |
parent | 5a2b187819fdf2f2500a356d9746149ebaddd0cf (diff) | |
download | samba-f9501f2ae4ecf0d98f28c43834c5f6cdb19f324f.tar.gz |
samba-tool domain: Remove unnecessary variable
It is conciser to use ‘r’ to refer to update_forest_info.entries[i].
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/netcmd/domain/trust.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/python/samba/netcmd/domain/trust.py b/python/samba/netcmd/domain/trust.py index d20ccee0b5b..a9fb4ef6604 100644 --- a/python/samba/netcmd/domain/trust.py +++ b/python/samba/netcmd/domain/trust.py @@ -2126,21 +2126,21 @@ class cmd_domain_trust_namespaces(DomainTrustCommand): update_forest_info.entries = entries if enable_all: - for i, r in enumerate(update_forest_info.entries): + for r in update_forest_info.entries: if r.type != lsa.LSA_FOREST_TRUST_TOP_LEVEL_NAME: continue - if update_forest_info.entries[i].flags == 0: + if r.flags == 0: continue - update_forest_info.entries[i].time = 0 - update_forest_info.entries[i].flags &= ~lsa.LSA_TLN_DISABLED_MASK - for i, r in enumerate(update_forest_info.entries): + r.time = 0 + r.flags &= ~lsa.LSA_TLN_DISABLED_MASK + for r in update_forest_info.entries: if r.type != lsa.LSA_FOREST_TRUST_DOMAIN_INFO: continue - if update_forest_info.entries[i].flags == 0: + if r.flags == 0: continue - update_forest_info.entries[i].time = 0 - update_forest_info.entries[i].flags &= ~lsa.LSA_NB_DISABLED_MASK - update_forest_info.entries[i].flags &= ~lsa.LSA_SID_DISABLED_MASK + r.time = 0 + r.flags &= ~lsa.LSA_NB_DISABLED_MASK + r.flags &= ~lsa.LSA_SID_DISABLED_MASK for tln in enable_tln: idx = None |