Skip to content

Commit

Permalink
Resolve unsoundness caught by pytype --strict-none-binding.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 586336266
  • Loading branch information
Capirca Team committed Nov 29, 2023
1 parent 0f0d1f1 commit 102b025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions capirca/lib/port.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def is_single_port(self):
@property
def start(self):
# return the first port in the range as int
if '-' in self.port:
if self.port is not None and '-' in self.port:
self._start = int(self.port.split('-')[0])
else:
raise InvalidRange('%s is not a valid port range' % self.port)
Expand All @@ -88,7 +88,7 @@ def start(self):
@property
def end(self):
# return the last port in the range as int
if '-' in self.port:
if self.port is not None and '-' in self.port:
self._end = int(self.port.split('-')[1])
else:
raise InvalidRange('%s is not a valid port range' % self.port)
Expand Down

0 comments on commit 102b025

Please sign in to comment.