~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.py

  • Committer: Vincent Ladeuil
  • Date: 2009-12-09 14:24:07 UTC
  • mto: (4901.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4902.
  • Revision ID: v.ladeuil+lp@free.fr-20091209142407-qqdaebna2fyz9vam
catch SIGWINCH, but that means soem IO can be interrupted and the code
base is not ready for that.

* bzrlib/ui/text.py:
(TextProgressView._show_line): Refresh width in case a SIGWINCH
was received.

* bzrlib/osutils.py:
(_terminal_size_changed): Trivial implementation

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
 
235
235
    def _show_line(self, s):
236
236
        # sys.stderr.write("progress %r\n" % s)
 
237
        self._width = osutils.terminal_width()
237
238
        if self._width is not None:
238
239
            n = self._width - 1
239
240
            s = '%-*.*s' % (n, n, s)