Skip to content

Commit

Permalink
fix: unicode support in db.sqllist. (bug#137042)
Browse files Browse the repository at this point in the history
  • Loading branch information
anandology committed Dec 15, 2007
1 parent 62d9019 commit 175c8b6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions web/db.py
Expand Up @@ -462,11 +462,12 @@ def sqllist(lst):
>>> sqllist(['a', 'b'])
'a, b'
>>> sqllist('a')
'a'
>>> sqllist('foo')
'foo'
>>> sqllist(u'foo')
u'foo'
"""
if isinstance(lst, str):
if isinstance(lst, (str, unicode)):
return lst
else:
return ', '.join(lst)
Expand Down

0 comments on commit 175c8b6

Please sign in to comment.