~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: mbp at sourcefrog
  • Date: 2006-10-31 01:15:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2114.
  • Revision ID: mbp@sourcefrog.net-20061031011534-105c53a11815f47b
Truncate progress bar rather than complaining if it's too long

Show diffs side-by-side

added added

removed removed

Lines of Context:
432
432
            bar_str = ''
433
433
 
434
434
        m = spin_str + bar_str + self.last_msg + count_str + pct_str + eta_str
435
 
 
436
 
        assert len(m) < self.width
437
 
        self.to_file.write('\r' + m.ljust(self.width - 1))
 
435
        self.to_file.write('\r%-*.*s' % (self.width - 1, self.width - 1, m))
438
436
        self._have_output = True
439
437
        #self.to_file.flush()
440
438