Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Do not count 'None' as valid ip address (#2352)
Browse files Browse the repository at this point in the history
* Do not count 'None' as valid ip address

* String check instead of normal none
  • Loading branch information
maaktweluit authored and badb committed Mar 13, 2018
1 parent 7c4c89b commit 7bb905c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions golem/network/transport/tcpserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ def get_socket_addresses(self, node_info, prv_port=None, pub_port=None):
@classmethod
def _is_address_valid(cls, address: str, port: int) -> bool:
try:
# FIXME: Where did None become 'None'?
if address == 'None':
logger.debug('Got "None" as socket address. Skipping...')
return False
return port > 0 and SocketAddress.is_proper_address(address, port)
except TypeError:
return False
Expand Down

0 comments on commit 7bb905c

Please sign in to comment.