Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/statsmaster/templates/anonymize_ips_head.erb

Issue 6293281981857792: Issue 239 - Move AWStats processing to the stats server (Closed)
Left Patch Set: Created April 23, 2014, 1:14 p.m.
Right Patch Set: Added IP address anonymization and addressed review comments Created April 25, 2014, 7:38 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « modules/statsmaster/manifests/downloads.pp ('k') | modules/statsmaster/templates/anonymize_ips_item.erb » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 #!/usr/bin/env python
2
3 import sys
4 import os
5 import re
6 from datetime import datetime, timedelta
7
8 yearmonth = sys.argv[1]
9 if yearmonth == 'prevmonth':
10 now = datetime.now()
11 yearmonth = (now - timedelta(days=now.day)).strftime('%Y%m')
12 year, month = re.search(r'^(\d{4})(\d{2})$', yearmonth).groups()
LEFTRIGHT

Powered by Google App Engine
This is Rietveld