Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Validate a MAC address and return normalized form.

        def validate_mac(mac):
    """Validate a MAC address and return normalized form."""

    if not _VALID_MAC_RE.match(mac):
        raise InvalidMacAddress("Invalid MAC address '%s'" % mac)

    return mac.lower()

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/db/models.py   synnefo(Download)
            mac_prefix = net_prefix + backend_suffix
                utils.validate_mac(mac_prefix + ":00:00:00")
            except utils.InvalidMacAddress:
                raise utils.InvalidMacAddress("Invalid MAC prefix '%s'" %