[yum-cvs] yum/yum __init__.py,1.222,1.223
Jeremy Katz
katzj at linux.duke.edu
Wed Aug 9 00:19:31 UTC 2006
Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv21435/yum
Modified Files:
__init__.py
Log Message:
Jeremy broke gpg key checking in yum 2.9x*. Attached is a patch to fix
it, as well as clean up exceptions (from yum.Error* to Error*). The
problem was just a matter of indentation. (patch + commentary from jbowes :)
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.222
retrieving revision 1.223
diff -u -r1.222 -r1.223
--- __init__.py 8 Aug 2006 14:07:46 -0000 1.222
+++ __init__.py 9 Aug 2006 00:19:29 -0000 1.223
@@ -2047,7 +2047,7 @@
timestamp = keyinfo['timestamp']
userid = keyinfo['userid']
except ValueError, e:
- raise yum.Errors.YumBaseError, \
+ raise Errors.YumBaseError, \
'GPG key parsing failed: ' + str(e)
# Check if key is already installed
@@ -2065,26 +2065,26 @@
rc = askcb(po, userid, hexkeyid)
if rc != True:
- return yum.Errors.YumBaseError, "Not installing key"
+ return Errors.YumBaseError, "Not installing key"
# Import the key
result = self.ts.pgpImportPubkey(misc.procgpgkey(rawkey))
if result != 0:
- raise yum.Errors.YumBaseError, \
+ raise Errors.YumBaseError, \
'Key import failed (code %d)' % result
self.logger.info('Key imported successfully')
key_installed = True
if not key_installed:
- raise yum.Errors.YumBaseError, \
+ raise Errors.YumBaseError, \
'The GPG keys listed for the "%s" repository are ' \
'already installed but they are not correct for this ' \
'package.\n' \
'Check that the correct key URLs are configured for ' \
'this repository.' % (repo.name)
- # Check if the newly installed keys helped
- result, errmsg = self.sigCheckPkg(po)
- if result != 0:
- self.logger.info("Import of key(s) didn't help, wrong key(s)?")
- raise yum.Errors.YumBaseError, errmsg
+ # Check if the newly installed keys helped
+ result, errmsg = self.sigCheckPkg(po)
+ if result != 0:
+ self.logger.info("Import of key(s) didn't help, wrong key(s)?")
+ raise Errors.YumBaseError, errmsg
More information about the Yum-cvs-commits
mailing list