From 2e2c751d75abd4a96c4f736a7375a8a04f79270d Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 30 Sep 2019 04:47:41 -0300 Subject: [PATCH] check for none on tcp port --- lbry/lbry/dht/peer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lbry/lbry/dht/peer.py b/lbry/lbry/dht/peer.py index cf443283d..cd150d1f6 100644 --- a/lbry/lbry/dht/peer.py +++ b/lbry/lbry/dht/peer.py @@ -156,7 +156,7 @@ class KademliaPeer: raise ValueError("invalid node_id: {}".format(hexlify(self._node_id).decode())) if self.udp_port is not None and not 0 <= self.udp_port <= 65536: raise ValueError("invalid udp port") - if self.tcp_port and not 0 <= self.tcp_port <= 65536: + if self.tcp_port is not None and not 0 <= self.tcp_port <= 65536: raise ValueError("invalid tcp port") if not is_valid_ipv4(self.address): raise ValueError("invalid ip address")