~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-27 02:00:27 UTC
  • mfrom: (5195.5.2 support_OO_flag_installer)
  • Revision ID: pqm@pqm.ubuntu.com-20100527020027-9vv0212agl257rt7
(lifeless) Make the installer on windows strip non-plugin docstrings.
 (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
        """Construct and return a new ProgressView subclass for this UI.
158
158
        """
159
159
        # with --quiet, never any progress view
160
 
        # <https://bugs.edge.launchpad.net/bzr/+bug/320035>.  Otherwise if the
 
160
        # <https://bugs.launchpad.net/bzr/+bug/320035>.  Otherwise if the
161
161
        # user specifically requests either text or no progress bars, always
162
162
        # do that.  otherwise, guess based on $TERM and tty presence.
163
163
        if self.is_quiet():
233
233
 
234
234
    def show_warning(self, msg):
235
235
        self.clear_term()
 
236
        if isinstance(msg, unicode):
 
237
            te = osutils.get_terminal_encoding()
 
238
            msg = msg.encode(te, 'replace')
236
239
        self.stderr.write("bzr: warning: %s\n" % msg)
237
240
 
238
241
    def _progress_updated(self, task):