1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-04 02:26:16 +01:00

fix request listing with --type without given target or source

This commit is contained in:
Adrian Schröter 2009-11-20 16:06:05 +00:00
parent 5e142d7fc9
commit 881349eaff
2 changed files with 4 additions and 1 deletions

View File

@ -971,7 +971,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='output the diff in the unified diff format')
@cmdln.option('-m', '--message', metavar='TEXT',
help='specify message TEXT')
@cmdln.option('-t', '--type', metavar='TEXT',
@cmdln.option('-t', '--type', metavar='TYPE',
help='limit to requests which contain a given action type (submit/delete/change_devel)')
@cmdln.option('-a', '--all', action='store_true',
help='all states. Same as\'-s all\'')

View File

@ -2539,6 +2539,9 @@ def get_request_list(apiurl, project, package, req_who='', req_state=('new',), r
if len(m):
if len(match): match += "%20and%20"
match += "(" + m + ")"
if req_type:
if len(match): match += '%20and%20'
match += '@type=\'%s\'' % quote_plus(req_type)
# XXX: we cannot use the '|' in the xpath expression because it is not supported
# in the backend