Skip to content

Commit

Permalink
Added support for tilda in provider ipc path
Browse files Browse the repository at this point in the history
  • Loading branch information
macbook authored and macbook committed Sep 10, 2018
1 parent e066452 commit d377cd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web3/providers/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ class IPCProvider(JSONBaseProvider):
def __init__(self, ipc_path=None, testnet=False, timeout=10, *args, **kwargs):
if ipc_path is None:
self.ipc_path = get_default_ipc_path(testnet)
elif isinstance(ipc_path, str) or isinstance(ipc_path, pathlib.Path):
self.ipc_path = str(pathlib.Path(ipc_path).expanduser().resolve())
else:
if isinstance(ipc_path, pathlib.Path):
ipc_path = str(ipc_path.resolve())
self.ipc_path = ipc_path
raise TypeError("ipc_path must be of type string or pathlib.Path")

self.timeout = timeout
self._lock = threading.Lock()
Expand Down

0 comments on commit d377cd3

Please sign in to comment.