r80595 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80594‎ | r80595 | r80596 >
Date:22:54, 19 January 2011
Author:rfaulk
Status:deferred
Tags:
Comment:
cleaning up some of the reporting on landing page miner.
Modified paths:
  • /trunk/fundraiser-statistics/fundraiser-scripts/mine_landing_pages.py (modified) (history)

Diff [purge]

Index: trunk/fundraiser-statistics/fundraiser-scripts/mine_landing_pages.py
@@ -73,6 +73,9 @@
7474 print >> sys.stdout, "Could not execute delete statement, DIFF too large\ndiff = " + str(time_diff) + "\ntime_start = " + start + "\ntime_end = " + end + "\nResuming insert ..."
7575
7676
 77+ count_correct = 0
 78+ count_total = 0
 79+
7780 # PROCESS LOG FILE
7881 # ================
7982 line = logFile.readline()
@@ -220,7 +223,7 @@
221224
222225 except:
223226 landing_page = 'NONE'
224 - country = mh.localize_IP(ip_add) + ' !'
 227+ country = mh.localize_IP(cur, ip_add)
225228
226229 else: # ...wikimediafoundation.org/wiki/...
227230
@@ -241,12 +244,11 @@
242245 country = landing_path[3]
243246
244247 except:
245 - country = mh.localize_IP(ip_add) + ' !'
 248+ country = mh.localize_IP(cur, ip_add)
246249
247250 # If country is confused with the language use the ip
248251 if country == country.lower():
249 - country = mh.localize_IP(ip_add) + ' !'
250 -
 252+ country = mh.localize_IP(cur, ip_add)
251253
252254 # ensure fields exist
253255 try:
@@ -272,11 +274,9 @@
273275 print "Could not insert:\n" + insertStmt_lp + val
274276 pass
275277
276 -
277278 line = logFile.readline()
278279
 280+
279281
280 -
281 -
282282
283283

Status & tagging log