for p in to_add: # then, parse new and changed torrents new_file = new_files[p] v = new_file[0] # new_file[0] is the file's (mod time,sz). infohash = new_file[1] if infohash in new_parsed: # duplicate, i.e., have same infohash. if p not in blocked or files[p][0] != v: errfunc(_("**warning** %s is a duplicate torrent for %s") % (p, new_parsed[infohash][0])) new_blocked[p] = None continue if NOISY: errfunc('adding '+p) try: metainfo = GetTorrent.get(p) new_file[1] = metainfo.infohash if new_parsed.has_key(metainfo.infohash): errfunc(_("**warning** %s is a duplicate torrent for %s") % (p, new_parsed[metainfo.infohash][0])) new_blocked[p] = None continue except Exception ,e: errfunc(_("**warning** %s has errors") % p) new_blocked[p] = None continue if NOISY: errfunc(_("... successful"))