]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Use "if dict.get(key):" instead "if key in dict and dict[key]:"
authorWei Wang <wangwei@unitedstack.com>
Thu, 7 Aug 2014 08:16:37 +0000 (16:16 +0800)
committerarmando-migliaccio <armamig@gmail.com>
Mon, 12 Jan 2015 22:05:54 +0000 (14:05 -0800)
commite2066f34e1187e4b021ecf6d1ec18a1e55b6eb21
treee55a49b3779ebfd34a17d25d82830922c9c75f13
parent0faafa17f0c3a7bbb0b5d4fd6ea194716a562fa0
Use "if dict.get(key):" instead "if key in dict and dict[key]:"

Use "if dict.get(key):" instead of "if key in dict and dict[key]:"
which makes code more clear and intelligible. Note this patch doesn't
change judging conditions, all "is not None" are retained.

Change-Id: Ieed57a21eb4b08c6f9a25b180a3625154a0d5fde
neutron/db/db_base_plugin_v2.py
neutron/db/l3_db.py
neutron/plugins/vmware/plugins/base.py
neutron/tests/unit/nuage/fake_nuageclient.py
neutron/tests/unit/test_db_plugin.py
neutron/tests/unit/test_l3_plugin.py
neutron/tests/unit/vmware/extensions/test_networkgw.py
neutron/tests/unit/vmware/test_nsx_plugin.py