Dictionary creation could be rewritten with dictionary literal
Instead of adding key-value pair individually, added them at the time of creation itself. TrivialFix Change-Id: Icf95680870e527d10eb94c7cba46adbacb80a653
This commit is contained in:
parent
ae5c27fcb6
commit
593fe8bd18
|
@ -98,13 +98,9 @@ class ExtensionsController(wsgi.Resource):
|
|||
super(ExtensionsController, self).__init__(None)
|
||||
|
||||
def _translate(self, ext):
|
||||
ext_data = {}
|
||||
ext_data['name'] = ext.name
|
||||
ext_data['alias'] = ext.alias
|
||||
ext_data['description'] = ext.__doc__
|
||||
ext_data['namespace'] = ext.namespace
|
||||
ext_data['updated'] = ext.updated
|
||||
ext_data['links'] = []
|
||||
ext_data = {'name': ext.name, 'alias': ext.alias,
|
||||
'description': ext.__doc__, 'namespace': ext.namespace,
|
||||
'updated': ext.updated, 'links': []}
|
||||
return ext_data
|
||||
|
||||
def index(self, req):
|
||||
|
|
Loading…
Reference in New Issue