osc-staging: exclude NonFree requests from staging proposals.

- NonFree delete requests are never staged.
- NonFree submit requests are handled by adi command.
This commit is contained in:
Jimmy Berry 2019-03-28 09:54:24 -05:00
parent d8487cd417
commit 5f0f3f498a
2 changed files with 3 additions and 3 deletions

View File

@ -547,7 +547,7 @@ def do_staging(self, subcmd, opts, *args):
print('--move and --filter-from must be used with explicit staging and request list')
return
open_requests = api.get_open_requests({'withhistory': 1})
open_requests = api.get_open_requests({'withhistory': 1}, include_nonfree=False)
if len(open_requests) == 0:
print('No open requests to consider')
return

View File

@ -633,7 +633,7 @@ class StagingAPI(object):
self.pseudometa_file_ensure('ignored_requests', ignore)
@memoize(session=True, add_invalidate=True)
def get_open_requests(self, query_extra=None):
def get_open_requests(self, query_extra=None, include_nonfree=True):
"""
Get all requests with open review for staging project
that are not yet included in any staging project
@ -645,7 +645,7 @@ class StagingAPI(object):
# xpath query, using the -m, -r, -s options
where = "@by_group='{}' and @state='new'".format(self.cstaging_group)
projects = [format(self.project)]
if self.cnonfree:
if include_nonfree and self.cnonfree:
projects.append(self.cnonfree)
targets = ["target[@project='{}']".format(p) for p in projects]