mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
format_results - apply format string on each dict in results list
This commit is contained in:
parent
7f845f2c70
commit
6c5a3738eb
@ -3513,6 +3513,10 @@ def get_package_results(apiurl, prj, package, lastbuild=None, repository=[], arc
|
||||
r.append(rmap)
|
||||
return r
|
||||
|
||||
def format_results(results, format):
|
||||
"""apply selected format on each dict in results and return it as a list of strings"""
|
||||
return (format % r for r in results)
|
||||
|
||||
def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[]):
|
||||
r = []
|
||||
result_line_templ = '%(rep)-20s %(arch)-10s %(status)s'
|
||||
|
Loading…
Reference in New Issue
Block a user