display_list must return str, not unicode
This commit is contained in:
parent
3e352e3b41
commit
fe379abb42
|
@ -26,7 +26,10 @@ def display_list(lst, separator='and'):
|
||||||
if len(lst) == 0:
|
if len(lst) == 0:
|
||||||
return ''
|
return ''
|
||||||
elif len(lst) == 1:
|
elif len(lst) == 1:
|
||||||
return lst[0]
|
ret = lst[0]
|
||||||
|
if isinstance(ret, unicode):
|
||||||
|
ret = ret.encode('utf8')
|
||||||
|
return ret
|
||||||
else:
|
else:
|
||||||
lst_ = []
|
lst_ = []
|
||||||
for l in lst[:-1]:
|
for l in lst[:-1]:
|
||||||
|
|
Loading…
Reference in New Issue