Index: modules/statsmaster/templates/anonymize_ips_item.erb |
diff --git a/modules/statsmaster/templates/anonymize_ips_item.erb b/modules/statsmaster/templates/anonymize_ips_item.erb |
deleted file mode 100644 |
index bb170412aed2ad8d321d156338c993536a3b18a6..0000000000000000000000000000000000000000 |
--- a/modules/statsmaster/templates/anonymize_ips_item.erb |
+++ /dev/null |
@@ -1,27 +0,0 @@ |
-file = os.path.join('/var/www/awstatsdata', '<%= title %>', |
- 'awstats%s%s.%s.txt' % (month, year, '<%= title %>')) |
-if os.path.exists(file): |
- with open(file, 'rb+') as f: |
- mapstarted = False |
- seekpos = None |
- for line in f: |
- if not mapstarted: |
- if line.startswith('BEGIN_MAP '): |
- mapstarted = True |
- else: |
- match = re.search(r'^POS_VISITOR (\d+)', line) |
- if match: |
- seekpos = int(match.group(1)) |
- break |
- |
- f.seek(seekpos) |
- data = f.readline() # BEGIN_VISITOR line |
- for line in f: |
- if line.startswith("END_VISITOR"): |
- break |
- parts = line.split(' ') |
- parts[0] = re.sub(r'\w', 'x', parts[0]) |
- data += ' '.join(parts) |
- |
- f.seek(seekpos) |
- f.write(data) |