Skip to content
Snippets Groups Projects
Commit 52fcd05b authored by Radko Krkoš's avatar Radko Krkoš
Browse files

Server/Tests: Fix omission from aedb6871 (last commit)

* Needed to correctly support UTF-8 ReadableSTR decoding on Py3
parent aedb6871
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ class ReadableSTR(str): ...@@ -70,7 +70,7 @@ class ReadableSTR(str):
"""Mission: To boldly quack like a buffer, like no str has quacked before""" """Mission: To boldly quack like a buffer, like no str has quacked before"""
def read(self, content_length=None): def read(self, content_length=None):
"""Return own content""" """Return own content"""
return self[0:content_length] return ReadableSTR(self[0:content_length])
if getattr(str, 'decode', None) is None: if getattr(str, 'decode', None) is None:
def decode(self, encoding="UTF-8", errors="strict"): # pylint: disable = locally-disabled, unused-argument def decode(self, encoding="UTF-8", errors="strict"): # pylint: disable = locally-disabled, unused-argument
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment