mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-08 23:54:20 +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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user