diff options
author | Frank Krick <frank.krick@gmail.com> | 2018-11-13 19:46:49 -0500 |
---|---|---|
committer | Frank Krick <frank.krick@gmail.com> | 2018-11-13 19:46:49 -0500 |
commit | e8a0eec937edd5469885b744ececd1b677be2b19 (patch) | |
tree | 7a99f4e4936c00bba63bdd1245ebc09dbed4c160 /waitress | |
parent | b048393c33e77a6f369d3345b67c25ba191480d7 (diff) | |
download | waitress-e8a0eec937edd5469885b744ececd1b677be2b19.tar.gz |
Fixed error in check_sockets method in adjustments when using Windows
Diffstat (limited to 'waitress')
-rw-r--r-- | waitress/adjustments.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/waitress/adjustments.py b/waitress/adjustments.py index 3ab3d00..9879fc8 100644 --- a/waitress/adjustments.py +++ b/waitress/adjustments.py @@ -378,7 +378,9 @@ class Adjustments(object): if (sock.family == socket.AF_INET or sock.family == socket.AF_INET6) and \ sock.type == socket.SOCK_STREAM: has_inet_socket = True - elif sock.family == socket.AF_UNIX and sock.type == socket.SOCK_STREAM: + elif hasattr(socket, 'AF_UNIX') and \ + sock.family == socket.AF_UNIX and \ + sock.type == socket.SOCK_STREAM: has_unix_socket = True else: has_unsupported_socket = True |