diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 00db79b3a..5e764344f 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -547,6 +547,7 @@ class Archiver: if pattern.match_count == 0: self.print_warning("Include pattern '%s' never matched.", pattern) if pi: + # clear progress output pi.finish() return self.exit_code diff --git a/src/borg/helpers.py b/src/borg/helpers.py index f2dd59ad0..ab2e1271a 100644 --- a/src/borg/helpers.py +++ b/src/borg/helpers.py @@ -1201,6 +1201,7 @@ def ellipsis_truncate(msg, space): ellipsis_width = swidth('...') msg_width = swidth(msg) if space < 8: + # if there is very little space, just show ... return '...' + ' ' * (space - ellipsis_width) if space < ellipsis_width + msg_width: return '%s...%s' % (swidth_slice(msg, space // 2 - ellipsis_width), @@ -1256,6 +1257,13 @@ class ProgressIndicatorPercent: return pct def show(self, current=None, increase=1, info=None): + """ + Show and output the progress message + + :param current: set the current percentage [None] + :param increase: increase the current percentage [None] + :param info: array of strings to be formatted with msg [None] + """ pct = self.progress(current, increase) if pct is not None: # truncate the last argument, if no space is available