ADD file via upload

master
pnhekgfuf 2 years ago
parent ddad27c2a9
commit 62541f5103

@ -0,0 +1,8 @@
import six
def bytes_to_str(s, encoding='utf-8'):
"""Returns a str if a bytes object is given."""
if six.PY3 and isinstance(s, bytes):
return s.decode(encoding)
return s
Loading…
Cancel
Save