[PATCH] ui: replace `self._ferr` with identical `dest`
Manuel Jacob
me at manueljacob.de
Mon Jun 22 00:10:26 UTC 2020
# HG changeset patch
# User Manuel Jacob <me at manueljacob.de>
# Date 1591245840 -7200
# Thu Jun 04 06:44:00 2020 +0200
# Node ID 1cb5db2ebec29368a7830092686e6afc1ca822b9
# Parent a46e36b824612be16b38a1c1cd11160c293d115b
# EXP-Topic ui_stream_buffering
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 @@
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 (
More information about the Mercurial-devel
mailing list