From e0fae072ebee420edb96addcf52e51ce25853ce8 Mon Sep 17 00:00:00 2001 From: Marco Strigl Date: Thu, 6 Oct 2016 15:07:21 +0200 Subject: [PATCH] improved watched output of osc results before joining the results on a osc r -w a newline is printed now --- osc/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osc/core.py b/osc/core.py index ce722787..25bf4134 100644 --- a/osc/core.py +++ b/osc/core.py @@ -5486,6 +5486,7 @@ def get_results(apiurl, project, package, verbose=False, printJoin='', *args, ** # api (unless we keep get_results around as well)... result_line_templ = '%(rep)-20s %(arch)-10s %(status)s' r = [] + printed = False for results in get_package_results(apiurl, project, package, **kwargs): r = [] 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) if printJoin: + if printed: + # will print a newline if already a result was printed (improves readability) + print() print(printJoin.join(r)) + printed = True return r