From 5a1c2447cb9d4bfe3970ecac6df6d5849bfab0c4 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 20 Sep 2022 07:02:58 +0930 Subject: [PATCH] pyln-client: use f strings to concatenate JSON ids, handle older integer ids. We don't really support using pyln-client with older Core Lightning versions, but this is neater anyway. I checked: f-strings go back to python 3.6, so we can use them (I think this may be the first!). Suggested-by: @MiWCryptAnalytics Fixes: #5609 Signed-off-by: Rusty Russell --- contrib/pyln-client/pyln/client/lightning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pyln-client/pyln/client/lightning.py b/contrib/pyln-client/pyln/client/lightning.py index 38193e03c..d5e42d82d 100644 --- a/contrib/pyln-client/pyln/client/lightning.py +++ b/contrib/pyln-client/pyln/client/lightning.py @@ -335,7 +335,7 @@ class UnixDomainSocketRpc(object): if cmdprefix is None: cmdprefix = self.cmdprefix if cmdprefix: - this_id = cmdprefix + '/' + this_id + this_id = f'{cmdprefix}/{this_id}' return this_id def call(self, method, payload=None, cmdprefix=None):