Jason Tackaberry wrote: > Author: tack > Date: Tue Sep 25 10:47:32 2007 > New Revision: 2840 > > Log: > Fix for exception when updating object that has an attribute of string type > that is ATTR_INVERTED_INDEX. > > > Modified: > trunk/base/src/db.py > > Modified: trunk/base/src/db.py > ============================================================================== > --- trunk/base/src/db.py (original) > +++ trunk/base/src/db.py Tue Sep 25 10:47:32 2007 > @@ -959,6 +959,12 @@ > terms_list = [] > for name, (attr_type, flags, attr_ivtidx, attr_split) in > type_attrs.items(): > if attr_ivtidx == ivtidx and name in attrs: > + if attr_type == str and type(attrs[name]) == buffer: > + # We store string objects in the db as buffers, in > + # order to prevent any unicode issues. So we need > + # to convert the buffer we got from the db back to > + # a string before parsing the attribute into terms. > + attrs[name] = str(attrs[name])
What is attrs[name]? The string "album" or the real album string? If
it is the later we need to be aware of unicode decode errors. Or can't
this happen?
Dischi
--
"Your job is being a professor and researcher: That's one hell of a
good excuse for some of the brain-damages of minix."
-Linus Torvalds to Andrew Tanenbaum
pgpfwsg9eDgUh.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Freevo-cvslog mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog
