From 550ab59e4e7731e3d5ab10db1cf29c50b6b356e3 Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Tue, 31 Jan 2017 18:24:04 -0600 Subject: [PATCH] request_splitter: replace incorrect devel project lookup copied from adi. Instead of checking action/source the action/target should be used. --- osclib/request_splitter.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/osclib/request_splitter.py b/osclib/request_splitter.py index 10f8c0d8..ea78c88d 100644 --- a/osclib/request_splitter.py +++ b/osclib/request_splitter.py @@ -67,7 +67,8 @@ class RequestSplitter(object): def suppliment(self, request, target_package): """ Provide additional information for grouping """ - devel = self.devel_project_get(request, target_package) + target_project = request.find('./action/target').get('project') + devel = self.devel_project_get(target_project, target_package) if devel: request.find('./action/source').set('devel_project', devel) @@ -89,12 +90,10 @@ class RequestSplitter(object): return ring[len(self.api.crings)+1:] return None - def devel_project_get(self, request, target_project): - # Preserve logic from adi and note that not Leap development friendly. - source = request.find('./action/source') - devel = self.api.get_devel_project(source.get('project'), source.get('package')) + def devel_project_get(self, target_project, target_package): + devel = self.api.get_devel_project(target_project, target_package) if devel is None and self.api.project.startswith('openSUSE:'): - devel = self.api.get_devel_project('openSUSE:Factory', target_project) + devel = self.api.get_devel_project('openSUSE:Factory', target_package) return devel def filter_check(self, request):