From 5a4b6be97459d256bea448254ecafec9d06eedb4 Mon Sep 17 00:00:00 2001 From: endes Date: Sun, 19 Apr 2020 20:14:21 +0100 Subject: [PATCH] fix --- lbry/dht/peer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lbry/dht/peer.py b/lbry/dht/peer.py index 44c659771..26f9581fd 100644 --- a/lbry/dht/peer.py +++ b/lbry/dht/peer.py @@ -34,8 +34,8 @@ def is_valid_public_ipv4(address, allow_localhost: bool = False): if parsed_ip.is_loopback and allow_localhost: return True - if any(parsed_ip.version != 4, parsed_ip.is_unspecified, parsed_ip.is_link_local, parsed_ip.is_loopback, - parsed_ip.is_multicast, parsed_ip.is_reserved, parsed_ip.is_private, parsed_ip.is_reserved): + if any((parsed_ip.version != 4, parsed_ip.is_unspecified, parsed_ip.is_link_local, parsed_ip.is_loopback, + parsed_ip.is_multicast, parsed_ip.is_reserved, parsed_ip.is_private, parsed_ip.is_reserved)): return False else: return not any((CARRIER_GRADE_NAT_SUBNET.supernet_of(ipaddress.ip_network(f"{address}/32")),