mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Relax address validation to allow for port 0 (aka "pick any free one").
This commit is contained in:
parent
7b302c73f0
commit
5cb80239f3
1 changed files with 2 additions and 2 deletions
|
|
@ -267,8 +267,8 @@ class Address(namedtuple('Address', 'host port')):
|
|||
def __init__(self, *args, **kwargs):
|
||||
if self.port is None:
|
||||
raise TypeError('missing port')
|
||||
if self.port <= 0 or self.port > 65535:
|
||||
raise ValueError('port must be positive int < 65535')
|
||||
if self.port < 0 or self.port > 65535:
|
||||
raise ValueError('port must be non-negative int < 65535')
|
||||
|
||||
def __repr__(self):
|
||||
orig = super(Address, self).__repr__()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue