'Sets the tracker (i.e. the torrent file\'s \'announce\' field).
@param url The announce URL.'

def set_tracker(self, url):

    if (not is_valid_url(url)):
        raise ValueError('Invalid    URL')
    if url.endswith('/'):
        url = url[:(-1)]
    self.input['announce'] = url
    self.metainfo_valid = False
