Skip to content

Commit

Permalink
SOCKS over Unix sockets: Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Apr 8, 2021
1 parent ebe2f66 commit 384337f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aiorpcx/socks.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def __init__(self, address, protocol, auth):
auth is an authentication method to use when connecting, or None.
'''
if not isinstance(address, NetAddress) and not isinstance(address, UnixAddress):
if not isinstance(address, (NetAddress, UnixAddress)):
address = NetAddress.from_string(address)
self.address = address
self.protocol = protocol
Expand Down
2 changes: 1 addition & 1 deletion aiorpcx/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def __init__(self, path: str):

def __eq__(self, other):
# pylint: disable=protected-access
return self._path == other._path
return isinstance(other, UnixAddress) and self._path == other._path

def __hash__(self):
return hash((self._path))
Expand Down

0 comments on commit 384337f

Please sign in to comment.