ordigi/elodie/compatability.py

8 lines
132 B
Python
Raw Normal View History

def _decode(string, encoding='utf8'):
if hasattr(string, 'decode'):
return string.decode(encoding)
return string