that it works with unicode and remove related unicode to str workaround
code from the sqlite cache module.
svn path=/main/trunk/; revision=12757
column_index +=1
if k not in internal_columns:
d[k] = result[0][column_index]
- # XXX: The resolver chokes on unicode strings so we convert them here.
- for k in d.keys():
- try:
- d[k]=str(d[k]) # convert unicode strings to normal
- except UnicodeEncodeError, e:
- pass #writemsg("%s: %s\n" % (cpv, str(e)))
+
return d
def _setitem(self, cpv, values):
if head[-1:] == "?": # Use reduce next group on fail.
# Pull any other use conditions and the following atom or list into a separate array
newdeparray = [head]
- while isinstance(newdeparray[-1], str) and newdeparray[-1][-1] == "?":
+ while isinstance(newdeparray[-1], basestring) and \
+ newdeparray[-1][-1:] == "?":
if mydeparray:
newdeparray.append(mydeparray.pop(0))
else: