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: If399250f582620c243512248acd16dff72764052
This commit is contained in:
tpatil 2016-08-10 14:27:05 -07:00
parent 984ab82a4d
commit 123a006f5a
1 changed files with 5 additions and 7 deletions

View File

@ -41,13 +41,11 @@ class ExtensionInfoController(wsgi.Controller):
self.extension_info = extension_info
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_data["updated"] = ""
ext_data["links"] = []
ext_data = {"name": ext.name,
"alias": ext.alias,
"description": ext.__doc__,
"namespace": "", "updated": "",
"links": []}
return ext_data
def _create_fake_ext(self, name, alias, description=""):