mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 10:46:15 +01:00
Take --repo/--arch options in "osc prjresults --xml..." into account
Fixes: #341 ("prjresults doesn't support repo/arch options")
This commit is contained in:
parent
8a81a68028
commit
f52cf7745a
@ -5176,7 +5176,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
project = store_read_project(wd)
|
||||
|
||||
if opts.xml:
|
||||
print(''.join(show_prj_results_meta(apiurl, project)))
|
||||
print(''.join(show_prj_results_meta(apiurl, project, opts.repo, opts.arch)))
|
||||
return
|
||||
|
||||
print('\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, \
|
||||
|
11
osc/core.py
11
osc/core.py
@ -5547,10 +5547,13 @@ def show_results_meta(apiurl, prj, package=None, lastbuild=None, repository=[],
|
||||
return f.readlines()
|
||||
|
||||
|
||||
def show_prj_results_meta(apiurl, prj):
|
||||
u = makeurl(apiurl, ['build', prj, '_result'])
|
||||
f = http_GET(u)
|
||||
return f.readlines()
|
||||
def show_prj_results_meta(apiurl, prj, repositories=None, arches=None):
|
||||
# this function is only needed for backward/api compatibility
|
||||
if repositories is None:
|
||||
repositories = []
|
||||
if arches is None:
|
||||
arches = []
|
||||
return show_results_meta(apiurl, prj, repository=repositories, arch=arches)
|
||||
|
||||
|
||||
def result_xml_to_dicts(xml):
|
||||
|
Loading…
Reference in New Issue
Block a user