From 292acac8ab9de3f8827a283e931ce00aa24e4e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Abdelkader=20Mart=C3=ADnez=20P=C3=A9rez?= Date: Fri, 2 Aug 2019 10:34:27 +0200 Subject: [PATCH] Inserting an empty line between .pow files when loading multiple at a time. Closes #6. --- poc/bin/kapow | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/poc/bin/kapow b/poc/bin/kapow index 2e5f947..9836dfd 100755 --- a/poc/bin/kapow +++ b/poc/bin/kapow @@ -17,6 +17,7 @@ # from urllib.parse import urlparse +from itertools import repeat from uuid import uuid4 import asyncio import io @@ -314,7 +315,11 @@ async def run_init_script(app, scripts): # No script given cmd = "/bin/bash" else: - filenames = " ".join(shlex.quote(f) for f in scripts) + def build_filenames(): + for filename in scripts: + yield shlex.quote(filename) + yield "<(echo)" + filenames = " ".join(build_filenames()) cmd = f"/bin/bash --init-file <(cat {filenames})" shell_task = await asyncio.create_subprocess_shell(