mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #14482: Raise a ValueError, not a NameError, when trying to create
a multiprocessing Client or Listener with an AF_UNIX type address under Windows. Patch by Popa Claudiu.
This commit is contained in:
commit
5c73e8eaf4
3 changed files with 12 additions and 0 deletions
|
@ -111,6 +111,10 @@ def _validate_family(family):
|
|||
if sys.platform != 'win32' and family == 'AF_PIPE':
|
||||
raise ValueError('Family %s is not recognized.' % family)
|
||||
|
||||
if sys.platform == 'win32' and family == 'AF_UNIX':
|
||||
# double check
|
||||
if not hasattr(socket, family):
|
||||
raise ValueError('Family %s is not recognized.' % family)
|
||||
|
||||
def address_type(address):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue