Shawn Walker wrote:

> My guess is that the string becomes unicode because of the _() and some
> other logic they have in place.

Except that, if I'm reading 2517 correctly, in 2.6 exceptions are always
converted to unicode, and never to str, when using "%s", regardless of
input.  That seems pretty broken to me, but there's not much we can do
about it.

> Adding this to the base exception class for this exception:
> 
>  55         def __unicode__(self):
>  56                 return self.__str__()
> 
> 
> ...seemed to resolve the issue as well.
> 
> I can refocus the bug on a more generic approach for all our exception
> classes and simply do what I did above for all the base ones.  Is that
> acceptable?

I think so, yes.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to