Merge pull request #579 from nilxam/quit_the_loop_if_found

Quit the loop if found the staging project for the request
This commit is contained in:
Ludwig Nussel 2016-10-14 14:28:16 +02:00 committed by GitHub
commit dec8e0fc76

View File

@ -155,13 +155,13 @@ class RequestFinder(object):
if _is_int(p) and self.api.get_package_for_request_id(staging, p): if _is_int(p) and self.api.get_package_for_request_id(staging, p):
self.srs[int(p)] = {'staging': staging} self.srs[int(p)] = {'staging': staging}
found = True found = True
continue break
else: else:
rq = self.api.get_request_id_for_package(staging, p) rq = self.api.get_request_id_for_package(staging, p)
if rq: if rq:
self.srs[rq] = {'staging': staging} self.srs[rq] = {'staging': staging}
found = True found = True
continue break
if not found: if not found:
raise oscerr.WrongArgs('No SR# found for: {}'.format(p)) raise oscerr.WrongArgs('No SR# found for: {}'.format(p))