~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Martin Pool
  • Date: 2009-01-16 02:43:37 UTC
  • mto: This revision was merged to the branch mainline in revision 3945.
  • Revision ID: mbp@sourcefrog.net-20090116024337-7m8qst4klrx5pklz
Don't do string interpolation if there are no arguments

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    def note(self, fmt_string, *args):
119
119
        """Record a note without disrupting the progress bar."""
120
120
        # XXX: shouldn't be here; put it in mutter or the ui instead
121
 
        self.ui_factory.note(fmt_string % args)
 
121
        if args:
 
122
            self.ui_factory.note(fmt_string % args)
 
123
        else:
 
124
            self.ui_factory.note(fmt_string)
122
125
 
123
126
    def clear(self):
124
127
        # XXX: shouldn't be here; put it in mutter or the ui instead