mirror of https://github.com/borgbackup/borg.git
just call print() once in the odd print_() function
this will help when we want to refactor output functions this function should definitely be replaced by a __repr__() or __str__() however
This commit is contained in:
parent
50fe290770
commit
c996fd8366
|
@ -143,13 +143,14 @@ class Statistics:
|
|||
|
||||
def print_(self, label, cache):
|
||||
total_size, total_csize, unique_size, unique_csize, total_unique_chunks, total_chunks = cache.chunks.summarize()
|
||||
print()
|
||||
print(' Original size Compressed size Deduplicated size')
|
||||
print('%-15s %20s %20s %20s' % (label, format_file_size(self.osize), format_file_size(self.csize), format_file_size(self.usize)))
|
||||
print('All archives: %20s %20s %20s' % (format_file_size(total_size), format_file_size(total_csize), format_file_size(unique_csize)))
|
||||
print()
|
||||
print(' Unique chunks Total chunks')
|
||||
print('Chunk index: %20d %20d' % (total_unique_chunks, total_chunks))
|
||||
buf = "\n"
|
||||
buf += ' Original size Compressed size Deduplicated size'
|
||||
buf += '%-15s %20s %20s %20s' % (label, format_file_size(self.osize), format_file_size(self.csize), format_file_size(self.usize))
|
||||
buf += 'All archives: %20s %20s %20s' % (format_file_size(total_size), format_file_size(total_csize), format_file_size(unique_csize))
|
||||
buf += "\n"
|
||||
buf += ' Unique chunks Total chunks'
|
||||
buf += 'Chunk index: %20d %20d' % (total_unique_chunks, total_chunks)
|
||||
print(buf)
|
||||
|
||||
def show_progress(self, item=None, final=False):
|
||||
if not final:
|
||||
|
|
Loading…
Reference in New Issue