~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/browser/build.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-14 20:51:41 UTC
  • mfrom: (14489.2.5 builds-without-component-0)
  • Revision ID: launchpad@pqm.canonical.com-20111214205141-k2ssga33wd6m2xf9
[r=abentley][bug=890103] Do not assume that the build has a component.

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
        return self.context.buildqueue_record
303
303
 
304
304
    @cachedproperty
305
 
    def component(self):
306
 
        return self.context.current_component
 
305
    def component_name(self):
 
306
        # Production has some buggy historic builds without
 
307
        # source publications.
 
308
        component = self.context.current_component
 
309
        if component is not None:
 
310
            return component.name
 
311
        else:
 
312
            return 'unknown'
307
313
 
308
314
    @cachedproperty
309
315
    def files(self):