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:
parent
5def2dcd74
commit
8d2b15e423
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue