From f8079546604e5d439a63e5e7d892d7425a367e8d Mon Sep 17 00:00:00 2001 From: Almaz Date: Sat, 17 Jul 2021 09:37:11 +0300 Subject: [PATCH] Use .join() instead of for loop (#16) --- scripts/mkdeb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mkdeb.py b/scripts/mkdeb.py index 115a706..b92265f 100755 --- a/scripts/mkdeb.py +++ b/scripts/mkdeb.py @@ -36,9 +36,9 @@ def parse_env(text: str, env: dict) -> str: return result def write_control_file(prefix: str, data: dict, env: dict) -> None: - lines = '' - for key, val in data.items(): - lines += f"{key}: {parse_env(val, env)}\n" + lines = ''.join( + f"{key}: {parse_env(val, env)}\n" for key, val in data.items() + ) with open(os.path.join(prefix, 'DEBIAN/control'), 'w+') as f: f.write(lines)