Skip to content

Commit

Permalink
Use .join() instead of for loop (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans authored Jul 17, 2021
1 parent 8b45dc2 commit f807954
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mkdeb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f807954

Please sign in to comment.