From 3327e40f09498ec07b016ec981ea26321e4afa96 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Sun, 12 Apr 2020 15:56:24 +0100 Subject: [PATCH] more consisten quoting --- server/setup | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/setup b/server/setup index 1e7039e..8c5b84f 100755 --- a/server/setup +++ b/server/setup @@ -37,8 +37,12 @@ def setup(args): server_bin = Path(__file__).parent.joinpath('grasp_server.py').absolute() template = args.template.replace('%', '%%').replace('\n', r'\n') # escape for systemd... - template = shlex.quote(template) - extra_args = f'--port {args.port} --path {args.path} --template {template}' + args = [ + '--port', args.port, + '--path', args.path, + '--template', template, + ] + extra_args = ' '.join(map(shlex.quote, args)) with out.open('w') as fo: fo.write(SYSTEMD_CONFIG.format(