import socket


def getservbyname(name):
    """Like socket.getservbyname() but return a ValueError with a descriptive
    message if the ser4vice is not found."""
    try:
        port = socket.getservbyname(name)
    except socket.error:
        raise ValueError('unknown service: {0}'.format(name))
    return port