def range_for_nightlies(fetch_config, start_date, end_date): """ Creates a BuildRange for inbounds nightlies. """ info_fetcher = NightlyInfoFetcher(fetch_config) futures_builds = [] # build the build range using only dates sd = to_date(start_date) for i in range((to_date(end_date) - sd).days + 1): futures_builds.append(FutureBuildInfo(info_fetcher, sd + datetime.timedelta(days=i))) # and now put back the real start and end dates # in case they were datetime instances (coming from buildid) futures_builds[0].data = start_date futures_builds[-1].data = end_date return BuildRange(info_fetcher, futures_builds)
def range_for_nightlies(fetch_config, start_date, end_date): """ Creates a BuildRange for inbounds nightlies. """ info_fetcher = NightlyInfoFetcher(fetch_config) futures_builds = [] # build the build range using only dates sd = to_date(start_date) for i in range((to_date(end_date) - sd).days + 1): futures_builds.append( FutureBuildInfo(info_fetcher, sd + datetime.timedelta(days=i))) # and now put back the real start and end dates # in case they were datetime instances (coming from buildid) futures_builds[0].data = start_date futures_builds[-1].data = end_date return BuildRange(info_fetcher, futures_builds)