def bridge_has_port(bridge, is_port_predicate):
 try:
  ifaces = bridge.get_iface_name_list()
 except RuntimeError as e:
  LOG.error(_LE('Cannot obtain interface list for bridge %(bridge)s: %(err)s'), {'bridge': bridge.br_name, 'err': e})
  return False
 return any((iface for iface in ifaces if is_port_predicate(iface)))

def bridge_has_port ( bridge , is_port_predicate ) : try : ifaces = bridge . get_iface_name_list ( ) except RuntimeError as e : LOG . error ( _LE ( 'Cannot obtain interface list for bridge %(bridge)s: %(err)s' ) , { 'bridge' : bridge . br_name , 'err' : e } ) return False return any ( ( iface for iface in ifaces if is_port_predicate ( iface ) ) )
true if there is an ovs port for which is_port_predicate is true .