819 label = opts.get('label', '') |
819 label = opts.get('label', '') |
820 msgs = [self.label(a, label) for a in args] |
820 msgs = [self.label(a, label) for a in args] |
821 self._write(*msgs, **opts) |
821 self._write(*msgs, **opts) |
822 |
822 |
823 def _write(self, *msgs, **opts): |
823 def _write(self, *msgs, **opts): |
824 self._progclear() |
824 self._progclear() |
825 # opencode timeblockedsection because this is a critical path |
825 # opencode timeblockedsection because this is a critical path |
826 starttime = util.timer() |
826 starttime = util.timer() |
827 try: |
827 try: |
828 for a in msgs: |
828 for a in msgs: |
829 self.fout.write(a) |
829 self.fout.write(a) |
830 finally: |
830 finally: |
831 self._blockedtimes['stdio_blocked'] += \ |
831 self._blockedtimes['stdio_blocked'] += \ |
832 (util.timer() - starttime) * 1000 |
832 (util.timer() - starttime) * 1000 |
833 |
833 |
834 def write_err(self, *args, **opts): |
834 def write_err(self, *args, **opts): |
835 self._progclear() |
835 self._progclear() |
836 if self._bufferstates and self._bufferstates[-1][0]: |
836 if self._bufferstates and self._bufferstates[-1][0]: |
837 self.write(*args, **opts) |
837 self.write(*args, **opts) |