]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
backport-create-issue: flush line before overprinting 31688/head
authorNathan Cutler <ncutler@suse.com>
Sat, 16 Nov 2019 06:53:01 +0000 (07:53 +0100)
committerNathan Cutler <ncutler@suse.com>
Sat, 16 Nov 2019 09:03:20 +0000 (10:03 +0100)
When iterating over "Pending Backport" issues, the script displays
a message for each issue, like so:

    Examining issue#53432 (345/543)

Since a newline is not printed, each subsequent message overwrites
the previous one. But the last one remained on the screen and was
being overwritten by a shorter log message, leaving behind an
unwanted artifact:

    INFO:root:Processed 334 issues)

Fixes: 8495d37695d43ea38e1b70851e4a6127ebb4fc76
Signed-off-by: Nathan Cutler <ncutler@suse.com>
src/script/backport-create-issue

index 6e419142637b81832ac084b50ebbe1b26cb7802b..02a475e5782b10f62226a9a3b5839e1f6866de7a 100755 (executable)
@@ -294,6 +294,7 @@ def iterate_over_backports(r, issues, dry_run=False):
         if len(issue['backports']) == 0:
             logging.error(url(issue) + " the backport field is empty")
         update_relations(r, issue, dry_run)
+    print('                                     \r', end='', flush=True)
     logging.info("Processed {} issues".format(counter))
     return None