diff options
author | Pär Tojkander <par.tojkander@assaabloy.com> | 2018-10-11 11:04:58 +0200 |
---|---|---|
committer | Pär Tojkander <par.tojkander@assaabloy.com> | 2018-10-11 11:04:58 +0200 |
commit | da1fdb16927f01420749d121cc17666a66684587 (patch) | |
tree | 7480e0eaf408c647882c3dbe3c6137d204239564 /websocket | |
parent | b65f8ba4b935528a56c751c2f1de7a7d2d12f17e (diff) | |
download | websocket-client-da1fdb16927f01420749d121cc17666a66684587.tar.gz |
Handle PY2/3
Diffstat (limited to 'websocket')
-rw-r--r-- | websocket/_handshake.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/websocket/_handshake.py b/websocket/_handshake.py index e28e88d..8c6f6a6 100644 --- a/websocket/_handshake.py +++ b/websocket/_handshake.py @@ -22,7 +22,6 @@ Copyright (C) 2010 Hiroki Ohtani(liris) import hashlib import hmac import os -from http import HTTPStatus import six @@ -37,6 +36,11 @@ if six.PY3: else: from base64 import encodestring as base64encode +if six.PY3: + from http import HTTPStatus +else: + import httplib as HTTPStatus + __all__ = ["handshake_response", "handshake", "SUPPORTED_REDIRECT_STATUSES"] if hasattr(hmac, "compare_digest"): |