|
CVS: BitTorrent/BitTorrent Rerequester.py,1.17,1.18 Storage.py,1.16,1.17: msg#00227network.bit-torrent.general
Update of /cvsroot/bittorrent/BitTorrent/BitTorrent In directory sc8-pr-cvs1:/tmp/cvs-serv3348/BitTorrent Modified Files: Rerequester.py Storage.py Log Message: made rerequester catch socket.errors properly, which is what urllib2 throws made files get flushed when saving is done Index: Rerequester.py =================================================================== RCS file: /cvsroot/bittorrent/BitTorrent/BitTorrent/Rerequester.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Rerequester.py 28 Mar 2003 02:10:45 -0000 1.17 --- Rerequester.py 28 Mar 2003 22:41:08 -0000 1.18 *************** *** 7,10 **** --- 7,11 ---- from threading import Thread, Lock from traceback import print_exc + from socket import error true = 1 false = 0 *************** *** 80,84 **** self.postrequest(r, callback) self.externalsched(add) ! except IOError, e: if set(): def fail(self = self, r = 'Problem connecting to tracker - ' + str(e)): --- 81,85 ---- self.postrequest(r, callback) self.externalsched(add) ! except (IOError, error), e: if set(): def fail(self = self, r = 'Problem connecting to tracker - ' + str(e)): Index: Storage.py =================================================================== RCS file: /cvsroot/bittorrent/BitTorrent/BitTorrent/Storage.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Storage.py 21 Mar 2003 06:15:09 -0000 1.16 --- Storage.py 28 Mar 2003 22:41:12 -0000 1.17 *************** *** 70,76 **** def set_readonly(self): # may raise IOError or OSError ! for file, old in self.handles.items(): ! self.handles[file] = open(file, 'rb') old.close() def get_total_length(self): --- 70,78 ---- def set_readonly(self): # may raise IOError or OSError ! for file in self.whandles.keys(): ! old = self.handles[file] ! old.flush() old.close() + self.handles[file] = open(file, 'rb') def get_total_length(self): *************** *** 104,107 **** --- 106,110 ---- for file, begin, end in self._intervals(pos, len(s)): if not self.whandles.has_key(file): + self.handles[file].close() self.handles[file] = open(file, 'rb+') self.whandles[file] = 1 ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/dkFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: BitTorrent-unsubscribe@xxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: About ready to delete it......: 00227, hoshi * |
|---|---|
| Next by Date: | CVS: BitTorrent bittorrent.nsi,1.41,1.42: 00227, Bram Cohen |
| Previous by Thread: | old style getargs format uses new featuresi: 00227, Loring Holden |
| Next by Thread: | CVS: BitTorrent bittorrent.nsi,1.41,1.42: 00227, Bram Cohen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |