From 0f4562fc7eb76a7783e28fda85735e65ff914f4b Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Wed, 4 Jun 2014 18:03:18 +0200 Subject: [PATCH] Save some eye bleeding to pythonists --- osclib/stagingapi.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osclib/stagingapi.py b/osclib/stagingapi.py index 749cdbf9..745e48fd 100644 --- a/osclib/stagingapi.py +++ b/osclib/stagingapi.py @@ -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))