# HG changeset patch # User Manuel Jacob # Date 2020-06-04 04:44:00 # Node ID 484e04dc7f4278698c867b91db4a2cc068e06c5c # Parent 65d19d9c8e767c6ae473b43473bc840f93060952 ui: replace `self._ferr` with identical `dest` Originally, it was part of a larger change that was abandoned. IMHO it makes the code slightly cleaner and saves one attribute access, so I decided to send it anyway instead of throwing it away. diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1200,7 +1200,7 @@ class ui(object): dest.write(msg) # stderr may be buffered under win32 when redirected to files, # including stdout. - if dest is self._ferr and not getattr(self._ferr, 'closed', False): + if dest is self._ferr and not getattr(dest, 'closed', False): dest.flush() except IOError as err: if dest is self._ferr and err.errno in (