mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
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 <rusty@rustcorp.com.au>
This commit is contained in:
parent
774d16a72e
commit
5a1c2447cb
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue