def info(self): torrent_name = self.recv() try: rc = MyParser(torrent_name) self.send(rc.get_state()+" "+rc.get_progress()) except: self.send(" ") print "---" print rc.get_progress() if "100%" in rc.get_progress(): if torrent_name in TorrentDict.keys() and TorrentDict[torrent_name]!="100%": print "full" mymutex.acquire() endServerDownloadFullTorrent(torrent_name) mymutex.release() TorrentDict[torrent_name]=rc.get_progress().split()[0]
def info(self): torrent_name = self.recv() try: rc = MyParser(torrent_name) self.send(rc.get_state() + " " + rc.get_progress()) except: self.send(" ") print "---" print rc.get_progress() if "100%" in rc.get_progress(): if torrent_name in TorrentDict.keys( ) and TorrentDict[torrent_name] != "100%": print "full" mymutex.acquire() endServerDownloadFullTorrent(torrent_name) mymutex.release() TorrentDict[torrent_name] = rc.get_progress().split()[0]