1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-03-13 13:15:53 +01:00

Get rid of polyglot as_unicode

This commit is contained in:
2020-06-17 17:45:07 +02:00
parent 4b27f55f5b
commit 976ef5ce36
5 changed files with 11 additions and 22 deletions

View File

@@ -13,13 +13,6 @@ def as_bytes(x, encoding='utf-8'):
return str(x).encode(encoding)
def as_unicode(x, encoding='utf-8', errors='strict'):
return str(x)
if isinstance(x, bytes):
return x.decode(encoding, errors)
return str(x)
def reraise(tp, value, tb=None):
try:
if value is None: