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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user