forked from LBRYCommunity/lbry-sdk
check for none on tcp port
This commit is contained in:
parent
7aa5e2cbe1
commit
2e2c751d75
1 changed files with 1 additions and 1 deletions
|
@ -156,7 +156,7 @@ class KademliaPeer:
|
||||||
raise ValueError("invalid node_id: {}".format(hexlify(self._node_id).decode()))
|
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:
|
if self.udp_port is not None and not 0 <= self.udp_port <= 65536:
|
||||||
raise ValueError("invalid udp port")
|
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")
|
raise ValueError("invalid tcp port")
|
||||||
if not is_valid_ipv4(self.address):
|
if not is_valid_ipv4(self.address):
|
||||||
raise ValueError("invalid ip address")
|
raise ValueError("invalid ip address")
|
||||||
|
|
Loading…
Add table
Reference in a new issue