~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/archivepublisher/scripts/generate_extra_overrides.py

  • Committer: Colin Watson
  • Date: 2012-01-03 01:30:48 UTC
  • mto: This revision was merged to the branch mainline in revision 14624.
  • Revision ID: cjwatson@canonical.com-20120103013048-4fe8yh7r2zugtxo9
Rewrite find_operable_series as a list comprehension.  Suggested by wgrant.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    We are allowed to modify DEVELOPMENT or FROZEN series, but should leave
60
60
    series with any other status alone.
61
61
    """
62
 
    operable_series = []
63
 
    for series in distribution.series:
64
 
        if series.status in (SeriesStatus.DEVELOPMENT, SeriesStatus.FROZEN):
65
 
            operable_series.append(series)
66
 
    return operable_series
 
62
    return [
 
63
        series for series in distribution.series
 
64
        if series.status in (SeriesStatus.DEVELOPMENT, SeriesStatus.FROZEN)]
67
65
 
68
66
 
69
67
class GenerateExtraOverrides(LaunchpadScript):