Skip to content

Commit

Permalink
Python 2.6 doesn't have dictionary comprehension
Browse files Browse the repository at this point in the history
Use constructor instead of comprehension

Change-Id: Icec78d946ab6cd4a190715d4835a392fbae5fefb
Closes-Bug: 1463624
  • Loading branch information
Sachin Bansal committed Jun 10, 2015
1 parent c34d1fe commit 0f0de2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api-lib/vnc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def str_to_class(class_name):

def compare_refs(old_refs, new_refs):
# compare refs in an object
old_ref_dict = {':'.join(ref['to']): ref['attr'] for ref in old_refs}
new_ref_dict = {':'.join(ref['to']): ref['attr'] for ref in new_refs}
old_ref_dict = dict((':'.join(ref['to']), ref['attr']) for ref in old_refs)
new_ref_dict = dict((':'.join(ref['to']), ref['attr']) for ref in new_refs)
return old_ref_dict == new_ref_dict
# end compare_refs

Expand Down

0 comments on commit 0f0de2b

Please sign in to comment.