# HG changeset patch # User Yuya Nishihara # Date 1541234637 -32400 # Node ID 0c7b2035a60400f904457768df82892837510149 # Parent 51091816a3559d28a9c8c82226ae790ef5ca2294 ui: indent _writenobuf() to prepare moving bits from _write() functions diff -r 51091816a355 -r 0c7b2035a604 mercurial/ui.py --- a/mercurial/ui.py Sat Nov 03 17:42:05 2018 +0900 +++ b/mercurial/ui.py Sat Nov 03 17:43:57 2018 +0900 @@ -952,15 +952,18 @@ def _writenobuf(self, write, *args, **opts): self._progclear() msg = b''.join(args) - if self._colormode == 'win32': - # windows color printing is its own can of crab, defer to - # the color module and that is it. - color.win32print(self, write, msg, **opts) - else: - if self._colormode is not None: - label = opts.get(r'label', '') - msg = self.label(msg, label) - write(msg) + try: + if self._colormode == 'win32': + # windows color printing is its own can of crab, defer to + # the color module and that is it. + color.win32print(self, write, msg, **opts) + else: + if self._colormode is not None: + label = opts.get(r'label', '') + msg = self.label(msg, label) + write(msg) + finally: + pass def _write(self, data): # opencode timeblockedsection because this is a critical path