1
0
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:
Marcus Huewe 2017-09-28 15:55:11 +02:00
parent 8a81a68028
commit f52cf7745a
2 changed files with 8 additions and 5 deletions

View File

@ -5176,7 +5176,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
project = store_read_project(wd) project = store_read_project(wd)
if opts.xml: if opts.xml:
print(''.join(show_prj_results_meta(apiurl, project))) print(''.join(show_prj_results_meta(apiurl, project, opts.repo, opts.arch)))
return return
print('\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, \ print('\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, \

View File

@ -5547,10 +5547,13 @@ def show_results_meta(apiurl, prj, package=None, lastbuild=None, repository=[],
return f.readlines() return f.readlines()
def show_prj_results_meta(apiurl, prj): def show_prj_results_meta(apiurl, prj, repositories=None, arches=None):
u = makeurl(apiurl, ['build', prj, '_result']) # this function is only needed for backward/api compatibility
f = http_GET(u) if repositories is None:
return f.readlines() repositories = []
if arches is None:
arches = []
return show_results_meta(apiurl, prj, repository=repositories, arch=arches)
def result_xml_to_dicts(xml): def result_xml_to_dicts(xml):