[Yum-devel] [PATCH] make pgpmsg.py comply with rfc and handle multiple keys per stanza gracefully.

Mike Bonnet mikeb at redhat.com
Mon Jan 4 22:15:53 UTC 2010


On 01/04/2010 04:46 PM, Seth Vidal wrote:
> From: Jens B. Jorgensen <jbj1 at ultraemail.net>
> 
> ---
>  yum/pgpmsg.py |  308 +++++++++++++++++++++++++++++++++++++++------------------
>  1 files changed, 210 insertions(+), 98 deletions(-)
> 
> diff --git a/yum/pgpmsg.py b/yum/pgpmsg.py
> index 24f5e42..6db8dd1 100644
> --- a/yum/pgpmsg.py
> +++ b/yum/pgpmsg.py

<snip>

> @@ -449,7 +480,7 @@ class public_key(pgp_packet) :
>          idx_save = idx
>          self.version, idx = get_whole_int(msg, idx, 1)
>          if self.version != 2 and self.version != 3 and self.version != 4 :
> -            raise RuntimeError('unknown public key packet version %d at %d' % (self.version, idx_save))
> +            raise 'unknown public key packet version %d at %d' % (self.version, idx_save)

Raising strs as exceptions was deprecated a long time ago, and doesn't
work at all on python 2.6+.


More information about the Yum-devel mailing list