From 33b717b5671eac3fd592c291f4730a7a9878c8f5 Mon Sep 17 00:00:00 2001 From: Max Lin Date: Thu, 13 Oct 2016 19:27:15 +0800 Subject: [PATCH] Quit the loop if found the staging project for the request If found the staging project for the request then it should quit the loop, continue the loop makes no sense. --- osclib/request_finder.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osclib/request_finder.py b/osclib/request_finder.py index 89852500..400ea137 100644 --- a/osclib/request_finder.py +++ b/osclib/request_finder.py @@ -155,13 +155,13 @@ class RequestFinder(object): if _is_int(p) and self.api.get_package_for_request_id(staging, p): self.srs[int(p)] = {'staging': staging} found = True - continue + break else: rq = self.api.get_request_id_for_package(staging, p) if rq: self.srs[rq] = {'staging': staging} found = True - continue + break if not found: raise oscerr.WrongArgs('No SR# found for: {}'.format(p))