X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/538526fc82b771cbc149743f129d8b1ae7e3cba2..3fceb197b7f492cf5cfcb4034b6e045638f128d4:/src/sortify.py?ds=sidebyside diff --git a/src/sortify.py b/src/sortify.py index 61cb9d892..941f50f1f 100644 --- a/src/sortify.py +++ b/src/sortify.py @@ -33,8 +33,8 @@ def sortify(value): """ - if not isinstance(value, unicode): - value = unicode(value, 'utf-8') + if not isinstance(value, str): + value = str(value, 'utf-8') # try to replace chars value = re.sub('[^a-zA-Z0-9\\s\\-]', replace_char, value)