1
0
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:
Michal Vyskocil 2010-04-20 14:38:14 +02:00
parent 7f845f2c70
commit 6c5a3738eb

View File

@ -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'