ML2: Simplified boolean variable check

Currently 'flows' is being checked for empty list in
a non standard way 'if flows == []:'. This patch
simplifies logic so that above check is unnecessary.

TrivialFix

Change-Id: I0eac42e425213b6588090e7e2379b14446308361
This commit is contained in:
Ravi Shekhar Jethani 2015-11-19 02:02:31 -08:00
parent 5def2dcd74
commit 8d2b15e423
1 changed files with 1 additions and 3 deletions

View File

@ -51,9 +51,7 @@ class OVSIntegrationBridge(ovs_bridge.OVSAgentBridge):
except RuntimeError:
LOG.exception(_LE("Failed to communicate with the switch"))
return constants.OVS_DEAD
if flows == []:
return constants.OVS_RESTARTED
return constants.OVS_NORMAL
return constants.OVS_NORMAL if flows else constants.OVS_RESTARTED
@staticmethod
def _local_vlan_match(_ofp, ofpp, port, vlan_vid):