MCPcopy Index your code
hub / github.com/python/cpython / _check_packed_address

Method _check_packed_address

Lib/ipaddress.py:416–421  ·  view source on GitHub ↗
(self, address, expected_len)

Source from the content-addressed store, hash-verified

414 self.version))
415
416 def _check_packed_address(self, address, expected_len):
417 address_len = len(address)
418 if address_len != expected_len:
419 msg = "%r (len %d != %d) is not permitted as an IPv%d address"
420 raise AddressValueError(msg % (address, address_len,
421 expected_len, self.version))
422
423 @classmethod
424 def _ip_int_from_prefix(cls, prefixlen):

Callers 2

__init__Method · 0.80
__init__Method · 0.80

Calls 1

AddressValueErrorClass · 0.85

Tested by

no test coverage detected