diff options
Diffstat (limited to 'obnamlib/backup_progress.py')
-rw-r--r-- | obnamlib/backup_progress.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/obnamlib/backup_progress.py b/obnamlib/backup_progress.py index e0bb55e6..dabf0b45 100644 --- a/obnamlib/backup_progress.py +++ b/obnamlib/backup_progress.py @@ -34,11 +34,22 @@ class BackupProgress(object): self._ts['current-file'] = '' self._ts['scanned-bytes'] = 0 self._ts['uploaded-bytes'] = 0 - self._ts.format('%ElapsedTime() ' - '%Counter(current-file) ' - 'files ' - '%ByteSize(scanned-bytes) scanned: ' - '%String(what)') + + if hasattr(self._ts, 'start_new_line'): + self._ts.format( + '%ElapsedTime() Backing up: ' + 'found %Counter(current-file) files, ' + '%ByteSize(scanned-bytes); ' + 'uploaded: %ByteSize(uploaded-bytes)\n' + '%String(what)' + ) + else: + self._ts.format( + '%ElapsedTime() ' + '%Counter(current-file) ' + 'files ' + '%ByteSize(scanned-bytes) scanned: ' + '%String(what)') def clear(self): self._ts.clear() |