~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Martin Packman
  • Date: 2012-04-30 09:14:35 UTC
  • mto: (6437.54.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6525.
  • Revision ID: martin.packman@canonical.com-20120430091435-7r0isye4632d4363
Document in bzrlib.progress that task messages must be unicode

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    Code updating the task may also set fields as hints about how to display
59
59
    it: show_pct, show_spinner, show_eta, show_count, show_bar.  UIs
60
60
    will not necessarily respect all these fields.
61
 
    
 
61
 
 
62
    The message given when updating a task must be unicode, not bytes.
 
63
 
62
64
    :ivar update_latency: The interval (in seconds) at which the PB should be
63
65
        updated.  Setting this to zero suggests every update should be shown
64
66
        synchronously.
106
108
            self.msg)
107
109
 
108
110
    def update(self, msg, current_cnt=None, total_cnt=None):
 
111
        """Report updated task message and if relevent progress counters
 
112
 
 
113
        The message given must be unicode, not a byte string.
 
114
        """
109
115
        self.msg = msg
110
116
        self.current_cnt = current_cnt
111
117
        if total_cnt: