~daisy-pluckers/daisy/trunk

« back to all changes in this revision

Viewing changes to tools/unique_systems_for_errors_by_release.py

  • Committer: Evan Dandrea
  • Date: 2013-04-26 02:22:25 UTC
  • mto: This revision was merged to the branch mainline in revision 327.
  • Revision ID: evan.dandrea@canonical.com-20130426022225-w8x9swnciq2sgx2r
Address Matthew's concerns from the merge proposal. Move 90 days into a RAMP_UP constant. Fix grammatical errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
import sys
6
6
from daisy import config
7
7
 
 
8
# The span of time (in days) we count for unique systems.
 
9
RAMP_UP = 90
 
10
 
8
11
def main(release, start, end, verbose=False):
9
12
    start = start.replace(hour=0, minute=0, second=0, microsecond=0)
10
13
    end = end.replace(hour=0, minute=0, second=0, microsecond=0)
20
23
 
21
24
    while start <= end:
22
25
        target_date = start.replace(hour=0, minute=0, second=0, microsecond=0)
23
 
        working_date = target_date - datetime.timedelta(days=89)
 
26
        working_date = target_date - datetime.timedelta(days=RAMP_UP - 1)
24
27
        one_day = datetime.timedelta(days=1)
25
28
 
26
29
        unique = set()