| Index: modules/statsmaster/templates/build_static_head.erb |
| =================================================================== |
| --- a/modules/statsmaster/templates/build_static_head.erb |
| +++ b/modules/statsmaster/templates/build_static_head.erb |
| @@ -1,11 +1,14 @@ |
| #!/usr/bin/env python |
| -import subprocess, sys, os, re |
| +import subprocess |
| +import sys |
| +import os |
| +import re |
| from datetime import datetime, timedelta |
| if len(sys.argv) > 1: |
| yearmonth = sys.argv[1] |
| if yearmonth == 'prevmonth': |
| now = datetime.now() |
| yearmonth = (now - timedelta(days=now.day)).strftime('%Y%m') |
| year, month = re.search(r'^(\d{4})(\d{2})$', yearmonth).groups() |