From 7bb905cec82fc20691a26ea240b4c7d5c10beabf Mon Sep 17 00:00:00 2001 From: maaktweluit <10008353+maaktweluit@users.noreply.github.com> Date: Tue, 13 Mar 2018 14:51:08 +0100 Subject: [PATCH] Do not count 'None' as valid ip address (#2352) * Do not count 'None' as valid ip address * String check instead of normal none --- golem/network/transport/tcpserver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/golem/network/transport/tcpserver.py b/golem/network/transport/tcpserver.py index 45e034adff..5c4bc308ed 100644 --- a/golem/network/transport/tcpserver.py +++ b/golem/network/transport/tcpserver.py @@ -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