MCPcopy Index your code
hub / github.com/RustPython/RustPython / _validate_family

Function _validate_family

Lib/multiprocessing/connection.py:84–94  ·  view source on GitHub ↗

Checks if the family is valid for the current environment.

(family)

Source from the content-addressed store, hash-verified

82 raise ValueError('unrecognized family')
83
84def _validate_family(family):
85 '''
86 Checks if the family is valid for the current environment.
87 '''
88 if sys.platform != 'win32' and family == 'AF_PIPE':
89 raise ValueError('Family %s is not recognized.' % family)
90
91 if sys.platform == 'win32' and family == 'AF_UNIX':
92 # double check
93 if not hasattr(socket, family):
94 raise ValueError('Family %s is not recognized.' % family)
95
96def address_type(address):
97 '''

Callers 2

__init__Method · 0.85
ClientFunction · 0.85

Calls 1

hasattrFunction · 0.85

Tested by

no test coverage detected