> In general we can't have generic functions (like exception2msg()) > returning str and unicode in different code paths ... it almost > guarantees unicode errors.
Yes. > Also changing the return type is probably > bad, even though it's relatively new. Not changing, unifying :) > I think I originally had it return str() objects because it was > replacing code like: "str(e)" with "exception2msg(e)" ... although > now it's used in a few places where it'd be better as unicode now. The 'return str()' code path was probably assumed to always return ascii-clean strings, so they're already unicode-compatible. > So maybe another function (uexception2msg?) or just lots of > to_unicode calls? IMO, every exception2msg() user handles (should handle) unicode. So, this should not break anything, I guess. _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel