Remove the unused utf8_repr function

This commit is contained in:
Dave Halter
2020-07-02 01:32:17 +02:00
parent e597dcc8fd
commit ebfc330e86

View File

@@ -198,24 +198,6 @@ def force_unicode(obj):
return cast_path(obj)
def utf8_repr(func):
"""
``__repr__`` methods in Python 2 don't allow unicode objects to be
returned. Therefore cast them to utf-8 bytes in this decorator.
"""
def wrapper(self):
result = func(self)
if isinstance(result, unicode):
return result.encode('utf-8')
else:
return result
if is_py3:
return func
else:
return wrapper
def pickle_load(file):
try:
return pickle.load(file)