def parse_host_port(hp, default_port=0):
    """
    Parse host/port from string

    Doesn't work with IPv6

    Args:
        hp: host/port string to parse
        default_port: default port if no port is specified (default: 0)

    Returns:
        tuple (host, port)
    """
    if hp.find(':') == -1:
        return hp, default_port
    else:
        host, port = hp.rsplit(':', 1)
        return host, int(port)
