[Yum-devel] [PATCH] Show full URLs and mirror errors when _getFile() fails.

James Antill james at fedoraproject.org
Wed Aug 22 12:49:54 UTC 2012


On Wed, 2012-08-22 at 11:50 +0200, Zdeněk Pavlas wrote:
> - exception2msg: prefer unicode(e) to e.value.

> diff --git a/yum/i18n.py b/yum/i18n.py
> index 76a258d..c4f72eb 100755
> --- a/yum/i18n.py
> +++ b/yum/i18n.py
> @@ -474,12 +474,12 @@ def exception2msg(e):
>      # to_unicode(e.value); unicode(e); str(e); 
>      # Call this so you don't have to care.
>      try:
> -        return to_unicode(e.value)
> +        return unicode(e)
>      except:
>          pass
>  
>      try:
> -        return unicode(e)
> +        return to_unicode(e.value)

 Just changing the ordering here fixes this exception (I assume), but
what does it do to every other exception (including system ones)?
 Also now the comment is wrong in exception2msg.

 IIRC the problem with calling unicode() first was with pre. py2.5 ...
but I'm not 100% sure.

 ACK to everything else.



More information about the Yum-devel mailing list