Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/169253

Change subject: geturls: Fix pyflakes warnings
......................................................................

geturls: Fix pyflakes warnings

Change-Id: If0ea91c49fa31c64254d73196088bea76c5c3a7f
---
M geturls/geturls.py
1 file changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/53/169253/1

diff --git a/geturls/geturls.py b/geturls/geturls.py
index 9efe3c0..2c043f2 100755
--- a/geturls/geturls.py
+++ b/geturls/geturls.py
@@ -139,16 +139,15 @@
             self.tryinglock.release()
             self.failedlock.release()
             self.poslock.release()
-            percent_done = 100 * tried / self.total_lines
-            curtime = datetime.datetime.now()
-            exectime = curtime - self.starttime
+            #percent_done = 100 * tried / self.total_lines
+            #curtime = datetime.datetime.now()
+            #exectime = curtime - self.starttime
             #print("status report: progress: %s%%, %s URLs tried, %s URLs 
failed, execution time: %s" %\
             #        (int(percent_done) + 1, tried, fail, exectime))
         return url
 
     @classmethod
     def print_status(cls):
-        pos = UrlCaller.position
         tried = UrlCaller.tried
         fail = UrlCaller.failed
         percent_done = 100 * tried / UrlCaller.total_lines
@@ -309,11 +308,11 @@
     last_pos = 0
     def __init__(self):
         threading.Thread.__init__(self)
-        cur_sec = 0
-        last_five_sec = [0,0,0,0,0]
-        last_thirty_sec = 
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
-        throughput_frequency = {}
-        last_pos = 0
+        self.cur_sec = 0
+        self.last_five_sec = [0,0,0,0,0]
+        self.last_thirty_sec = 
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
+        self.throughput_frequency = {}
+        self.last_pos = 0
 
     def run(self):
         #self.setDaemon(True)
@@ -365,7 +364,6 @@
         # now for some fancy footwork.  To decrease the number of lines 
printed, combine nearby stats.
         # for each key, calculate 10%.  Sum all keys that show up between key 
and key+10%, then report as key + 5% +-5%
         tp_keys.reverse()  # work from small numbers up
-        real_max = tp_keys[0]
         while len(tp_keys) > 0:
             key = tp_keys.pop()
             if(key == 0):

-- 
To view, visit https://gerrit.wikimedia.org/r/169253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0ea91c49fa31c64254d73196088bea76c5c3a7f
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to