r158 - in /debtorrent/trunk/DebTorrent: BT1/DownloaderFeedback.py download_bt1.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Fri Jul 13 19:59:38 UTC 2007


Author: camrdale-guest
Date: Fri Jul 13 19:59:38 2007
New Revision: 158

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=158
Log:
Remove the unused spew option.

Modified:
    debtorrent/trunk/DebTorrent/BT1/DownloaderFeedback.py
    debtorrent/trunk/DebTorrent/download_bt1.py

Modified: debtorrent/trunk/DebTorrent/BT1/DownloaderFeedback.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/BT1/DownloaderFeedback.py?rev=158&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/BT1/DownloaderFeedback.py (original)
+++ debtorrent/trunk/DebTorrent/BT1/DownloaderFeedback.py Fri Jul 13 19:59:38 2007
@@ -46,14 +46,10 @@
     @ivar file_length: the total length of the download
     @type finflag: C{threading.Event}
     @ivar finflag: flag to indicate when the download is complete
-    @type sp: C{threading.Event}
-    @ivar sp: whether to include the per-connection info in the gathered data
     @type statistics: L{Statistics.Statistics}
     @ivar statistics: the statistics gatherer for the download
     @type lastids: C{list} of C{string}
     @ivar lastids: the peer IDs that were found the last time
-    @type spewdata: unknown
-    @ivar spewdata: not used
     @type doneprocessing: C{threading.Event}
     @ivar doneprocessing: flag that is set when the previous display is complete
     @type displayfunc: C{method}
@@ -64,7 +60,7 @@
     """
     
     def __init__(self, choker, httpdl, add_task, upfunc, downfunc,
-            ratemeasure, leftfunc, file_length, finflag, sp, statistics,
+            ratemeasure, leftfunc, file_length, finflag, statistics,
             statusfunc = None, interval = None):
         """Initialize the instance.
         
@@ -109,10 +105,8 @@
         self.leftfunc = leftfunc
         self.file_length = file_length
         self.finflag = finflag
-        self.sp = sp
         self.statistics = statistics
         self.lastids = []
-        self.spewdata = None
         self.doneprocessing = Event()
         self.doneprocessing.set()
         if statusfunc:
@@ -205,10 +199,6 @@
         """
         
         s = {'stats': self.statistics.update()}
-        if self.sp.isSet():
-            s['spew'] = self.spews()
-        else:
-            s['spew'] = None
         s['up'] = self.upfunc()
         if self.finflag.isSet():
             s['done'] = self.file_length
@@ -243,18 +233,18 @@
         if self.finflag.isSet():
             displayfunc(dpflag = self.doneprocessing,
                 upRate = stats['up'],
-                statistics = stats['stats'], spew = stats['spew'])
+                statistics = stats['stats'])
         elif stats['time'] is not None:
             displayfunc(dpflag = self.doneprocessing,
                 fractionDone = stats['frac'], sizeDone = stats['done'],
                 downRate = stats['down'], upRate = stats['up'],
-                statistics = stats['stats'], spew = stats['spew'],
+                statistics = stats['stats'],
                 timeEst = stats['time'])
         else:
             displayfunc(dpflag = self.doneprocessing,
                 fractionDone = stats['frac'], sizeDone = stats['done'],
                 downRate = stats['down'], upRate = stats['up'],
-                statistics = stats['stats'], spew = stats['spew'])
+                statistics = stats['stats'])
 
 
     def autodisplay(self, displayfunc, interval):

Modified: debtorrent/trunk/DebTorrent/download_bt1.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/download_bt1.py?rev=158&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/download_bt1.py (original)
+++ debtorrent/trunk/DebTorrent/download_bt1.py Fri Jul 13 19:59:38 2007
@@ -66,6 +66,9 @@
         'file the server response was stored in, alternative to url'),
     ('url', '',
         'url to get file from, alternative to responsefile'),
+    ('priority', '',
+        'a list of file priorities separated by commas, must be one per file, ' +
+        '0 = highest, 1 = normal, 2 = lowest, -1 = download disabled'),
     # Locations
     ('download_dir', '',
         'directory to save the download in, blank indicates use the user\'s ' +
@@ -218,13 +221,8 @@
     ('dedicated_seed_id', '',
         'code to send to tracker identifying as a dedicated seed'),
 
-    ('priority', '',
-        'a list of file priorities separated by commas, must be one per file, ' +
-        '0 = highest, 1 = normal, 2 = lowest, -1 = download disabled'),
     ('display_interval', .5,
         'time between updates of displayed information'),
-    ('spew', 0,
-        'whether to display diagnostic info to stdout'),
     ]
 
 argslistheader = 'Arguments are:\n\n'
@@ -607,8 +605,6 @@
     @ivar super_seeding_active: whether the download is in super-seed mode
     @type filedatflag: C{threading.Event}
     @ivar filedatflag: unknown
-    @type spewflag: C{threading.Event}
-    @ivar spewflag: unknown
     @type superseedflag: C{threading.Event}
     @ivar superseedflag: indicates the upload is in super-seed mode
     @type whenpaused: C{float}
@@ -724,7 +720,6 @@
         self.fileselector = None
         self.super_seeding_active = False
         self.filedatflag = Event()
-        self.spewflag = Event()
         self.superseedflag = Event()
         self.whenpaused = None
         self.finflag = Event()
@@ -1275,8 +1270,6 @@
                     self.rerequest_lastfailed, self.filedatflag)
         if self.info.has_key('files'):
             self.statistics.set_dirstats(self.files, self.piece_lengths)
-        if self.config['spew']:
-            self.spewflag.set()
 
     def autoStats(self, displayfunc = None):
         """Start the statistics automatic displayer for the user.
@@ -1293,7 +1286,7 @@
         DownloaderFeedback(self.choker, self.httpdownloader, self.rawserver.add_task,
             self.upmeasure.get_rate, self.downmeasure.get_rate,
             self.ratemeasure, self.storagewrapper.get_stats,
-            self.datalength, self.finflag, self.spewflag, self.statistics,
+            self.datalength, self.finflag, self.statistics,
             displayfunc, self.config['display_interval'])
 
     def startStats(self):
@@ -1308,7 +1301,7 @@
         d = DownloaderFeedback(self.choker, self.httpdownloader, self.rawserver.add_task,
             self.upmeasure.get_rate, self.downmeasure.get_rate,
             self.ratemeasure, self.storagewrapper.get_stats,
-            self.datalength, self.finflag, self.spewflag, self.statistics)
+            self.datalength, self.finflag, self.statistics)
         return d.gather
 
 




More information about the Debtorrent-commits mailing list