Replace functions 'Dict.get' and 'del' with 'Dict.pop'

Refactoring code: Making 'report' dict to use single instruction: pop()
rather than two instructions: get() and del, giving the codes a format
that carries through.

TrivialFix

Change-Id: I92c672ef14cf0a75a619b9d73865c49bf398fc91
This commit is contained in:
bhagyashris
2016-08-26 18:28:44 +05:30
parent a89dfdcbde
commit 7f21be290d

View File

@@ -174,8 +174,7 @@ def report_notification(report):
LOG.debug('Got report from orchestration '
'engine:\n{report}'.format(report=report))
report['entity_id'] = report['id']
del report['id']
report['entity_id'] = report.pop('id')
status = models.Status()
if 'timestamp' in report: