def is_valid_mac(addr):
    addrs = addr.split(':')
    if len(addrs) != 6:
        return False
    for m in addrs:
        try:
            if int(m, 16) > 255:
                return False
        except ValueError:
            return False
    return True
Check the syntax of a given mac address.
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/common/utils.py/is_valid_mac