From: Björn Jacke Date: Sun, 25 Aug 2019 20:53:59 +0000 (+0200) Subject: samba_abi.py: avoid inefficient string concatenations X-Git-Tag: talloc-2.3.1~746 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2291679e2b02e729e34ef848164d6630c5adc546;p=thirdparty%2Fsamba.git samba_abi.py: avoid inefficient string concatenations Signed-off-by: Bjoern Jacke Reviewed-by: Andrew Bartlett --- diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 5e7686da3d6..bf82fc5fe1f 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -72,9 +72,7 @@ def parse_sigs(sigs, abi_match): def save_sigs(sig_file, parsed_sigs): '''save ABI signatures to a file''' - sigs = '' - for s in sorted(parsed_sigs.keys()): - sigs += '%s: %s\n' % (s, parsed_sigs[s]) + sigs = "".join('%s: %s\n' % (s, parsed_sigs[s]) for s in sorted(parsed_sigs.keys())) return samba_utils.save_file(sig_file, sigs, create_dir=True)