~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/distroseriesdifferencejob.py

  • Committer: Raphael Badin
  • Date: 2011-07-27 10:34:53 UTC
  • mto: This revision was merged to the branch mainline in revision 13552.
  • Revision ID: raphael.badin@canonical.com-20110727103453-3v25z6xwpsshojx5
Remove optionnal parent_series parameter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
 
193
193
    @classmethod
194
194
    def createForPackagePublication(cls, derived_series, sourcepackagename,
195
 
                                    pocket, parent_series=None):
 
195
                                    pocket):
196
196
        """See `IDistroSeriesDifferenceJobSource`."""
197
197
        if not getFeatureFlag(FEATURE_FLAG_ENABLE_MODULE):
198
198
            return
205
205
            PackagePublishingPocket.PROPOSED):
206
206
            return
207
207
        jobs = []
208
 
        if parent_series is None:
209
 
            parent_series = derived_series.getParentSeries()
210
 
        else:
211
 
            parent_series = [parent_series]
 
208
        parent_series = derived_series.getParentSeries()
212
209
        # Create jobs for DSDs between the derived_series and its
213
210
        # parents.
214
211
        for parent in parent_series:
226
223
        return jobs
227
224
 
228
225
    @classmethod
229
 
    def massCreateForSeries(cls, derived_series, parent_series=None):
 
226
    def massCreateForSeries(cls, derived_series):
230
227
        """See `IDistroSeriesDifferenceJobSource`."""
231
228
        if not getFeatureFlag(FEATURE_FLAG_ENABLE_MODULE):
232
229
            return
233
 
        if parent_series is None:
234
 
            parent_series = derived_series.getParentSeries()
235
 
        else:
236
 
            parent_series = [parent_series]
237
 
        for parent in parent_series:
238
 
            create_multiple_jobs(derived_series, parent)
 
230
        for parent_series in derived_series.getParentSeries():
 
231
            create_multiple_jobs(derived_series, parent_series)
239
232
 
240
233
    @classmethod
241
234
    def getPendingJobsForDifferences(cls, derived_series,