@@ -54,7 +54,7 @@ def select(cls, env, args={}, notify=None):
54
54
"""
55
55
Retrieve existing subscription(s).
56
56
"""
57
- select = 'SELECT * FROM code_comments_subscriptions'
57
+ select = u 'SELECT * FROM code_comments_subscriptions'
58
58
59
59
if notify :
60
60
args ['notify' ] = bool (notify )
@@ -63,16 +63,16 @@ def select(cls, env, args={}, notify=None):
63
63
select += ' WHERE '
64
64
criteria = []
65
65
for key , value in args .iteritems ():
66
- template = '{0}={1}'
66
+ template = u '{0}={1}'
67
67
if isinstance (value , basestring ):
68
- template = '{0}=\' {1}\' '
68
+ template = u '{0}=\' {1}\' '
69
69
if (isinstance (value , tuple ) or isinstance (value , list )):
70
- template = '{0} IN (\' {1}\' )'
71
- value = '\' ,\' ' .join (value )
70
+ template = u '{0} IN (\' {1}\' )'
71
+ value = u '\' ,\' ' .join (value )
72
72
if isinstance (value , bool ):
73
73
value = int (value )
74
74
criteria .append (template .format (key , value ))
75
- select += ' AND ' .join (criteria )
75
+ select += u ' AND ' .join (criteria )
76
76
77
77
for row in env .db_query (select ):
78
78
yield cls ._from_row (env , row )
@@ -188,7 +188,7 @@ def from_attachment(cls, env, attachment, user=None, notify=True):
188
188
"""
189
189
Creates a subscription from an Attachment object.
190
190
"""
191
- _path = "/{0}/{1}/{2}" .format (attachment .parent_realm ,
191
+ _path = u "/{0}/{1}/{2}" .format (attachment .parent_realm ,
192
192
attachment .parent_id ,
193
193
attachment .filename )
194
194
0 commit comments