> As always the big problem is that this is a significant API change for
> yum, so we'd need to somehow audit every piece of code that ever used
> yum and make sure this doesn't affect them negatively.
> I'd guess that it probably doesn't, but it's much easier to just know
> it doesn't because we didn't API break anything.
I understand this. Found only one user of this in Yum,
and it's not likely used by any plugin.
> > reproducer:
> > >>> e = yum.Errors.YumRPMTransError('Foo', [])
> > >>> yum.i18n.exception2msg(e.value)
>
> Why call exception2msg(e.value) ? Does any code actually do that?
> exception2msg(e) works, right?
def exFatal(e):
logger.critical('\n\n%s', exception2msg(e.value))
if unlock(): return 200
return 1
Here it's probably a (another) bug, should be exception2msg(e), but
exception2msg() getattrs value first, too:
def exception2msg(e):
try:
return to_unicode(e.value)
...
to_unicode() simply returns the arg when it's a list. And I'd rather
not touch this, since exception2msg() and to_unicode() are used a lot.
_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel