mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
LightningRpc should accept pathlib Path
Not sure why socket does not accept pathlib, but just added some code to transform the path to string. It is not the most pretty code, but better than these: https://stackoverflow.com/questions/58647584/how-to-test-if-object-is-a-pathlib-path
This commit is contained in:
parent
019b31c522
commit
dded47e332
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ class UnixSocket(object):
|
|||
"""
|
||||
|
||||
def __init__(self, path: str):
|
||||
self.path = path
|
||||
self.path = str(path) if 'pathlib' in str(type(path)) else path
|
||||
self.sock: Optional[socket.SocketType] = None
|
||||
self.connect()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue