mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +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
@ -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…
Reference in New Issue
Block a user