Merge pull request #104 from saberuster/master

decode add a replace option
This commit is contained in:
Kubernetes Prow Robot 2019-06-20 17:10:36 -07:00 committed by GitHub
commit 474e9fb322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,7 @@ class WSClient:
elif op_code == ABNF.OPCODE_BINARY or op_code == ABNF.OPCODE_TEXT:
data = frame.data
if six.PY3:
data = data.decode("utf-8")
data = data.decode("utf-8", "replace")
if len(data) > 1:
channel = ord(data[0])
data = data[1:]