1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 18:26: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)
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, \

View File

@ -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):