def is_valid_mac(addr):
    """Check the syntax of a given mac address.

    The acceptable format is xx:xx:xx:xx:xx:xx
    """
    addrs = addr.split(':')
    if len(addrs) != 6:
        return False
    for m in addrs:
        try:
            if int(m, 16) > 255:
                return False
        except __HOLE__:
            return False
    return True
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/common/utils.py/is_valid_mac