Permalink
Browse files

fix: unicode support in db.sqllist. (bug#137042)

  • Loading branch information...
1 parent 62d9019 commit 175c8b665f18e56d053cca25c4366516154d0850 @anandology anandology committed Dec 15, 2007
Showing with 5 additions and 4 deletions.
  1. +5 −4 web/db.py
View
@@ -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)

0 comments on commit 175c8b6

Please sign in to comment.