示例#1
0
 def traverse_translation_templates_build(self, id_string):
     """Traverses to a `TranslationTemplatesBuild`."""
     from lp.soyuz.browser.build import get_build_by_id_str
     ttb = get_build_by_id_str(ITranslationTemplatesBuildSource, id_string)
     if ttb is None or ttb.branch != self.context:
         return None
     return ttb
 def traverse_build(self, name):
     build = get_build_by_id_str(IBinaryPackageBuildSet, name)
     if (build is None or build.archive
             not in self.context.distribution.all_distro_archives
             or build.source_package_release !=
             self.context.sourcepackagerelease):
         return None
     return build
示例#3
0
 def traverse_build(self, name):
     build = get_build_by_id_str(ISnapBuildSet, name)
     if build is None or build.snap != self.context:
         return None
     return build
示例#4
0
 def traverse_snapbuild(self, name):
     build = get_build_by_id_str(ISnapBuildSet, name)
     if build is None:
         return None
     return self.redirectSubTree(canonical_url(build))
示例#5
0
 def traverse_recipebuild(self, name):
     build = get_build_by_id_str(ISourcePackageRecipeBuildSource, name)
     if build is None:
         return None
     return self.redirectSubTree(canonical_url(build))
示例#6
0
 def traverse_build(self, name):
     build = get_build_by_id_str(ILiveFSBuildSet, name)
     if build is None or build.livefs != self.context:
         return None
     return build