Merge "Rename launchpad parameter to group"

This commit is contained in:
Jenkins 2013-12-30 23:27:16 +00:00 committed by Gerrit Code Review
commit 4e60f41905
3 changed files with 6 additions and 7 deletions

View File

@ -70,7 +70,7 @@ def update_spec(launchpad, project, name, subject, link, topic=None):
if p.is_no_launchpad_blueprints(project):
return
project = p.git2lp(project)
project = p.project_to_group(project)
spec = launchpad.projects[project].getSpecification(name=name)
if not spec:
return

View File

@ -272,7 +272,7 @@ def find_bugs(launchpad, git_log, args):
if p.is_no_launchpad_bugs(project):
return []
project = p.git2lp(project)
project = p.project_to_group(project)
part1 = r'^[\t ]*(?P<prefix>[-\w]+)?[\s:]*'
part2 = r'(?:\b(?:bug|lp)\b[\s#:]*)+'

View File

@ -31,11 +31,10 @@ registry = u.ProjectsYamlRegistry('/home/gerrit2/projects.yaml',
'PROJECTS_YAML')
def git2lp(project_full_name):
try:
return registry[project_full_name]['launchpad']
except KeyError:
return u.short_project_name(project_full_name)
def project_to_group(project_full_name):
return registry[project_full_name].get(
'group', registry[project_full_name].get(
'launchpad', u.short_project_name(project_full_name)))
def _is_no_launchpad(project_full_name, obj_type):