~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Julian Edwards
  • Date: 2011-08-02 13:29:19 UTC
  • mto: This revision was merged to the branch mainline in revision 13611.
  • Revision ID: julian.edwards@canonical.com-20110802132919-xrbax006d95berl7
Add DistroSeriesDifferenceJob.__repr__

Show diffs side-by-side

added added

removed removed

Lines of Context:
255
255
                jobs_by_dsd.setdefault(dsd, []).append(cls(job))
256
256
        return jobs_by_dsd
257
257
 
 
258
    def __repr__(self):
 
259
        """Returns an informative representation of the job."""
 
260
        parts = "%s for " % self.__class__.__name__
 
261
        name = self.sourcepackagename
 
262
        if not name:
 
263
            parts += "no package name (!)"
 
264
        else:
 
265
            parts += "package %s" % name
 
266
        parts += " from %s to %s" % (self.parent_series.name,
 
267
                                     self.derived_series.name)
 
268
        return "<%s>" % parts
 
269
 
258
270
    @property
259
271
    def sourcepackagename(self):
260
272
        return SourcePackageName.get(self.metadata['sourcepackagename'])