diff options
author | Björn Jacke <bj@sernet.de> | 2019-08-25 23:04:25 +0200 |
---|---|---|
committer | Bjoern Jacke <bjacke@samba.org> | 2019-09-24 12:22:44 +0000 |
commit | 4c34a2d72569f31d59b904c3ca1c140f6084b3dd (patch) | |
tree | 93d411a086409d27f873a61ca681538b5f6c6d67 /python | |
parent | b8f4f141a2d7aed9a8af572b27e2afcc1365bf3b (diff) | |
download | samba-4c34a2d72569f31d59b904c3ca1c140f6084b3dd.tar.gz |
traffic.py: avoid inefficient string concatenations
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/emulate/traffic.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/python/samba/emulate/traffic.py b/python/samba/emulate/traffic.py index d0a2ffc8f2c..c428b4e369e 100644 --- a/python/samba/emulate/traffic.py +++ b/python/samba/emulate/traffic.py @@ -453,9 +453,7 @@ class ReplayContext(object): # lookup all the GPO DNs res = db.search(db.domain_dn(), scope=ldb.SCOPE_SUBTREE, attrs=['dn'], expression='(objectclass=groupPolicyContainer)') - gpos_by_dn = "" - for msg in res: - gpos_by_dn += "(distinguishedName={0})".format(msg['dn']) + gpos_by_dn = "".join("(distinguishedName={0})".format(msg['dn']) for msg in res) # a search for the 'gPCFileSysPath' attribute is probably a GPO search # (as per the MS-GPOL spec) which searches for GPOs by DN |