# HG changeset patch # User Pierre-Yves David # Date 2017-06-12 15:15:43 # Node ID 3a4c677cbd6e1b2d296cfaa784605d761e2047f0 # Parent 2b0fc56840d05a0aabffce75a468dd5d16b0664b profile: remove now useless indent We no longer rely on the value of '_output' so we can remove this conditional. diff --git a/mercurial/profiling.py b/mercurial/profiling.py --- a/mercurial/profiling.py +++ b/mercurial/profiling.py @@ -213,14 +213,13 @@ class profile(object): if self._profiler is None: return self._profiler.__exit__(exception_type, exception_value, traceback) - if self._output: - if self._output == 'blackbox': - val = 'Profile:\n%s' % self._fp.getvalue() - # ui.log treats the input as a format string, - # so we need to escape any % signs. - val = val.replace('%', '%%') - self._ui.log('profile', val) - self._closefp() + if self._output == 'blackbox': + val = 'Profile:\n%s' % self._fp.getvalue() + # ui.log treats the input as a format string, + # so we need to escape any % signs. + val = val.replace('%', '%%') + self._ui.log('profile', val) + self._closefp() def _closefp(self): if self._fpdoclose and self._fp is not None: