mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-25 09:26:14 +01:00
ignore gpg key import errors
Some projects use the same gpg key. To avoid osc from quitting when building against two or more such projects at the same time ignore gpg key import errors as long as at least one key could be imported.
This commit is contained in:
parent
be425d3261
commit
3d610e6e0b
@ -26,7 +26,13 @@ class Checker:
|
||||
def readkeys(self, keys=[]):
|
||||
rpm.addMacro('_dbpath', self.dbdir)
|
||||
for key in keys:
|
||||
self.readkey(key)
|
||||
try:
|
||||
self.readkey(key)
|
||||
except KeyError, e:
|
||||
print e
|
||||
|
||||
if not len(self.imported):
|
||||
raise KeyError('', "no key imported")
|
||||
|
||||
rpm.delMacro("_dbpath")
|
||||
|
||||
|
@ -218,8 +218,9 @@ class Fetcher:
|
||||
url = "%s/source/%s/_pubkey" % (buildinfo.apiurl, i)
|
||||
try:
|
||||
OscFileGrabber().urlgrab(url, dest)
|
||||
buildinfo.keys.append(dest)
|
||||
buildinfo.prjkeys.append(i)
|
||||
if not i in buildinfo.prjkeys: # not that many keys usually
|
||||
buildinfo.keys.append(dest)
|
||||
buildinfo.prjkeys.append(i)
|
||||
except KeyboardInterrupt:
|
||||
print 'Cancelled by user (ctrl-c)'
|
||||
print 'Exiting.'
|
||||
|
Loading…
Reference in New Issue
Block a user