[mirrorbrain-commits] [mod_stats] r69 - /trunk/tools/dlcount.py

From: <poeml_at_mirrorbrain.org>
Date: Sun, 03 Oct 2010 20:24:00 -0000
Author: poeml
Date: Sun Oct  3 22:24:00 2010
New Revision: 69

URL: http://svn.mirrorbrain.org/viewvc/mod_stats?rev=69&view=rev
Log:
make the dlcount script work with a StatsLogMask that doesn't look for the
request country. If not looking for the country, the regexp returns only 6
match groups, not 7. An example for this would be:
StatsLogMask "^(\S+).+\[(.*?)\] \"GET (\S*) HTTP.*\" (200|302) [^\"]+ \"([^\"]*)\" \"([^\"]*)\".*"

Modified:
    trunk/tools/dlcount.py

Modified: trunk/tools/dlcount.py
URL: http://svn.mirrorbrain.org/viewvc/mod_stats/trunk/tools/dlcount.py?rev=69&r1=68&r2=69&view=diff
==============================================================================
--- trunk/tools/dlcount.py (original)
+++ trunk/tools/dlcount.py Sun Oct  3 22:24:00 2010
_at_@ -287,7 +287,11 @@
 
     for req in reqs: 
         rq = Req()
-        (ip, tstamp_raw, url, status, referer, ua, country) = req
+        if len(req) == 7:
+            (ip, tstamp_raw, url, status, referer, ua, country) = req
+        elif len(req) == 6:
+            (ip, tstamp_raw, url, status, referer, ua) = req
+            country = ''
 
         skip = False
         for r, mreg in conf['statsignoremask']:




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sun Oct 03 2010 - 20:24:04 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT