On Mon, Dec 13, 2010 at 11:44:34AM -0500, seth vidal wrote:
> On Fri, 2010-12-10 at 20:58 -0800, Toshio Kuratomi wrote:
> 
> > If I was using kitchen's to_unicode, I could shorten the list of functions
> > and skip the final to_unicode call::
> > from kitchen.text.converters import to_unicode
> >     conversion_funcs = (to_unicode, lambda e: to_unicode(e.args[0]), lambda 
> > e: to_unicode(e.value))
> >     for func in conversion_funcs:
> >         try:
> >             return func(e)
> >         except:
> >             pass
> >     return u'<exception failed to convert to text>'
> > 
> 
> 
> Seems like now might be a fine time to pull in python-kitchen as a dep
> and then work to migrate out our own functions from misc.py and i18n.py
> a little at a time.
> 
Just to let everyone know, I'm working on adding a more general version
of exception_to_unicode() to kitchen and then, since people seem amenable to
adding kitchen as a yum dep, patching yum to use it.  I wrote some unittests
for the kitchen version and it fails on a few strings that I'm presently
looking into.

-Toshio

Attachment: pgp19Tr0xbBYD.pgp
Description: PGP signature

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to