def mon_hosts(mons):
    """
    Iterate through list of MON hosts, return tuples of (name, host).
    """
    for m in mons:
        if m.count(':'):
            (name, host) = m.split(':')
        else:
            name = m
            host = m
            if 0 > name.count('.'):
                name = name.split('.')[0]
        yield (name, host)
dataset/ETHPy150Open ceph/ceph-deploy/ceph_deploy/misc.py/mon_hosts/swapped operands of `>`