Oops it's not a string... it has to be something path-like that implements __fspath__

This commit is contained in:
David Tan 2017-11-18 02:44:58 -05:00
parent 2782e426e7
commit fe79eb46a7

View File

@ -567,7 +567,7 @@ def serve(host, port, request_handler, error_handler, before_start=None,
debug=debug,
)
if isinstance(sock, str):
if hasattr(sock, '__fspath__'):
server_coroutine = loop.create_unix_server(
server,
path=sock,