satisfy codecov

This commit is contained in:
Abogical 2016-11-14 17:37:49 +02:00
parent 3896f26ab2
commit 34f529c7df
2 changed files with 9 additions and 0 deletions

View File

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

View File

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