Skip to content

Commit

Permalink
vendoring of wsproto
Browse files Browse the repository at this point in the history
https://github.com/python-hyper/wsproto.git
commit 5ea2da61266796666f5de6461aaae22e6b00deba
  • Loading branch information
Kriechi committed Dec 12, 2017
1 parent 70e1409 commit f5fafbf
Show file tree
Hide file tree
Showing 7 changed files with 1,419 additions and 4 deletions.
20 changes: 20 additions & 0 deletions mitmproxy/contrib/wsproto/compat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# flake8: noqa

import sys


PY2 = sys.version_info.major == 2
PY3 = sys.version_info.major == 3


if PY3:
unicode = str

def Utf8Validator():
return None
else:
unicode = unicode
try:
from wsaccel.utf8validator import Utf8Validator
except ImportError:
from .utf8validator import Utf8Validator
Loading

0 comments on commit f5fafbf

Please sign in to comment.