'Sets the DHT nodes required by the mainline DHT support,
See http://www.bittorrent.org/beps/bep_0005.html
@param nodes A list of [hostname,port] lists.'

def set_dht_nodes(self, nodes):

    if (not isinstance(nodes, ListType)):
        raise ValueError('nodes    not    a    list')
    else:
        for node in nodes:
            if ((not isinstance(node, ListType)) or (len(node) != 2)):
                raise ValueError(('node    in    nodes    not    a    2-item    list:    ' + repr(node)))
            if (not isinstance(node[0], StringType)):
                raise ValueError(('host    in    node    is    not    string:' + repr(node)))
            if (not isinstance(node[1], IntType)):
                raise ValueError(('port    in    node    is    not    int:' + repr(node)))
    self.input['nodes'] = nodes
    self.metainfo_valid = False
