def parse_scale(scale):
    """Parse a scale of format `name=int`.

    :returns: name and scale integer.

    :raises: ValueError.
    """
    try:
        name, num = scale.split('=', 1)
        return name, int(num)
    except (TypeError, ValueError):
        raise ValueError('{0}: bad scale'.format(scale))
