simplify progress display

we stop enforcing a minimum width for fields, it changes only on
logarithmic boundaries, so not a big problem. string conversion is
implicit

this gives us a little more width for the path
This commit is contained in:
Antoine Beaupré 2015-10-15 22:23:53 -04:00
parent ecae163072
commit 75c993b875
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ class Statistics:
def show_progress(self, item=None, final=False): def show_progress(self, item=None, final=False):
(columns, lines) = get_terminal_size((80, 24)) (columns, lines) = get_terminal_size((80, 24))
if not final: if not final:
msg = format(self, '{0.osize:9.9s} O {0.csize:9.9s} C {0.usize:9.9s} D {0.nfiles} N ') msg = format(self, '{0.osize} O {0.csize} C {0.usize} D {0.nfiles} N ')
path = remove_surrogates(item[b'path']) if item else '' path = remove_surrogates(item[b'path']) if item else ''
space = columns - len(msg) space = columns - len(msg)
if space < len('...') + len(path): if space < len('...') + len(path):