~james-w/python-oops-tools/prod-deploy

« back to all changes in this revision

Viewing changes to src/oopstools/scripts/prune.py

  • Committer: James Westby
  • Date: 2012-12-05 17:30:35 UTC
  • mto: This revision was merged to the branch mainline in revision 50.
  • Revision ID: james.westby@canonical.com-20121205173035-0jh3yye5ohr5o884
Decode report when reading it to send email.

Also adjust the logging path for the prune script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
                    'One of options %s must be supplied' % (optnames,))
88
88
    needed('project', 'projectgroup')
89
89
    logging.basicConfig(
90
 
        filename='prune.log', filemode='w', level=logging.DEBUG)
 
90
        filename='logs/prune.log', filemode='w', level=logging.DEBUG)
91
91
    one_week = datetime.timedelta(weeks=1)
92
92
    one_day = datetime.timedelta(days=1)
93
93
    # Only prune OOPS reports more than one week old.