~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/model/sourcepackagerecipedata.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-03 06:00:47 UTC
  • mfrom: (14403.2.7 recipe-format-0.4)
  • Revision ID: launchpad@pqm.canonical.com-20120103060047-qlvyjzp97wac8s5f
[r=gmb][bug=891928] Add support for version 0.4 of the recipe format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
        return branch
142
142
 
143
143
 
144
 
MAX_RECIPE_FORMAT = 0.3
 
144
MAX_RECIPE_FORMAT = 0.4
145
145
 
146
146
 
147
147
class SourcePackageRecipeData(Storm):
160
160
    base_branch = Reference(base_branch_id, 'Branch.id')
161
161
 
162
162
    recipe_format = Unicode(allow_none=False)
163
 
    deb_version_template = Unicode(allow_none=False)
 
163
    deb_version_template = Unicode(allow_none=True)
164
164
    revspec = Unicode(allow_none=True)
165
165
 
166
166
    instructions = ReferenceSet(
306
306
        self._recordInstructions(
307
307
            builder_recipe, parent_insn=None, branch_map=branch_map)
308
308
        self.base_branch = base_branch
309
 
        self.deb_version_template = unicode(builder_recipe.deb_version)
 
309
        if builder_recipe.deb_version is None:
 
310
            self.deb_version_template = None
 
311
        else:
 
312
            self.deb_version_template = unicode(builder_recipe.deb_version)
310
313
        self.recipe_format = unicode(builder_recipe.format)
311
314
 
312
315
    def __init__(self, recipe, sourcepackage_recipe=None,