summaryrefslogtreecommitdiff
path: root/Que/client.py
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-04-15 23:12:18 -0700
committerBen Sima <ben@bsima.me>2020-04-15 23:12:18 -0700
commitf79cfe42aac5f5cef8865f7a6975f6a430c923a1 (patch)
tree20d0f7e1746df04e2d9a553b4c1de99505efb83c /Que/client.py
parentbfa8e3b88e247e40c2c4fc1ab03176599cc4170b (diff)
Use python format strings for args.then
Diffstat (limited to 'Que/client.py')
-rwxr-xr-xQue/client.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Que/client.py b/Que/client.py
index f4ee601..1063eb8 100755
--- a/Que/client.py
+++ b/Que/client.py
@@ -96,9 +96,7 @@ def then(args, msg):
if args.then:
logging.debug("then")
subprocess.run(
- args.then.replace(r"\msg", msg).replace(r"\que", args.target),
- check=False,
- shell=True,
+ args.then.format(msg=msg, que=args.target), check=False, shell=True,
)
@@ -144,7 +142,7 @@ def get_args():
[
"when polling, run this shell command after each response,",
"presumably for side effects,"
- r"replacing '\que' with the target and '\msg' with the body of the response",
+ r"replacing '{que}' with the target and '{msg}' with the body of the response",
]
),
)