Save some eye bleeding to pythonists

This commit is contained in:
Ancor Gonzalez Sosa 2014-06-04 18:03:18 +02:00
parent 507e50d633
commit 0f4562fc7e

View File

@ -1089,11 +1089,8 @@ class StagingAPI(object):
lines = ['[osc staging %s]\n' % command]
lines.append('The list of requests tracked in %s has changed:\n' % project)
for req in meta['requests']:
author = ''
if 'author' in req.keys():
# Proper metadata
author = req['author']
else:
author = req.get('autor', None)
if not author:
# Old style metadata
author = get_request(self.apiurl, str(req['id'])).get_creator()
lines.append('Request req#%s for package %s submitted by [AT]%s' % (req['id'], req['package'], author))