[Pypi-checkins] r856 - trunk/pypi/tools
martin.von.loewis
python-checkins at python.org
Fri Aug 20 16:51:37 CEST 2010
Author: martin.von.loewis
Date: Fri Aug 20 16:51:37 2010
New Revision: 856
Modified:
trunk/pypi/tools/apache_stats.py
Log:
Fix field order in keys.
Modified: trunk/pypi/tools/apache_stats.py
==============================================================================
--- trunk/pypi/tools/apache_stats.py (original)
+++ trunk/pypi/tools/apache_stats.py Fri Aug 20 16:51:37 2010
@@ -8,6 +8,8 @@
from apache_reader import ApacheLogReader
+# dictionary key structure: filename, user_agent, package_name
+
class LocalStats(object):
"""Base class that writes the log file
"""
@@ -116,7 +118,7 @@
def read_stats_dict(self, stats_file):
res = {}
for r in self.read_stats(stats_file):
- key = (r['packagename'], r['filename'], r['useragent'])
+ key = (r['filename'], r['useragent'], r['packagename'])
value = r['count']
res[key] = value
return res
More information about the Pypi-checkins
mailing list