[Yum-devel] [PATCH] gpgkey improvements

Menno Smits menno-yum at freshfoo.com
Tue Jan 18 22:22:43 UTC 2005


seth vidal wrote:
> Looks great.
> 
> I added one thing.
> if the gpgkey specified in the config is garbage it would exit with a
> traceback. Specifically:
> Traceback (most recent call last):
>   File "./yummain.py", line 173, in ?
>     main(sys.argv[1:])
>   File "./yummain.py", line 146, in main
>     base.doTransaction()
>   File "/home/skvidal/cvs/yum-HEAD/cli.py", line 636, in doTransaction
>     if self.gpgsigcheck(downloadpkgs) != 0:
>   File "/home/skvidal/cvs/yum-HEAD/cli.py", line 730, in gpgsigcheck
>     keyinfo = yum.misc.getgpgkeyinfo(rawkey)
>   File "/home/skvidal/cvs/yum-HEAD/yum/misc.py", line 192, in
> getgpgkeyinfo
>     info = {
> AttributeError: 'NoneType' object has no attribute 'user_id'
> 
> 
> I added a check in yum.misc.getgpgkeyinfo():
> 
> if key is None:
>     raise ValueError('No key found in given key data')
> 
> If you'd rather it not be that way, or if there is a better place to
> catch that, let me know. It seemed reasonable to me when I was looking
> through the code.

Glad you noticed that. Your check seems like the right thing to do.

Sorry about the delayed reply. I've been rather sick.

Menno



Scanned by the NetBox from NetBox Blue
(http://netboxblue.com/)




More information about the Yum-devel mailing list