mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 15:06:15 +01:00
improved watched output of osc results
before joining the results on a osc r -w a newline is printed now
This commit is contained in:
parent
6ec62da3cc
commit
e0fae072eb
@ -5486,6 +5486,7 @@ def get_results(apiurl, project, package, verbose=False, printJoin='', *args, **
|
|||||||
# api (unless we keep get_results around as well)...
|
# api (unless we keep get_results around as well)...
|
||||||
result_line_templ = '%(rep)-20s %(arch)-10s %(status)s'
|
result_line_templ = '%(rep)-20s %(arch)-10s %(status)s'
|
||||||
r = []
|
r = []
|
||||||
|
printed = False
|
||||||
for results in get_package_results(apiurl, project, package, **kwargs):
|
for results in get_package_results(apiurl, project, package, **kwargs):
|
||||||
r = []
|
r = []
|
||||||
for res in result_xml_to_dicts(results):
|
for res in result_xml_to_dicts(results):
|
||||||
@ -5513,7 +5514,11 @@ def get_results(apiurl, project, package, verbose=False, printJoin='', *args, **
|
|||||||
r.append(result_line_templ % res)
|
r.append(result_line_templ % res)
|
||||||
|
|
||||||
if printJoin:
|
if printJoin:
|
||||||
|
if printed:
|
||||||
|
# will print a newline if already a result was printed (improves readability)
|
||||||
|
print()
|
||||||
print(printJoin.join(r))
|
print(printJoin.join(r))
|
||||||
|
printed = True
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user