Show More
@@ -214,15 +214,14 b' class profile(object):' | |||
|
214 | 214 | raise |
|
215 | 215 | |
|
216 | 216 | def __exit__(self, exception_type, exception_value, traceback): |
|
217 | if self._profiler is None: | |
|
218 | return | |
|
219 | self._profiler.__exit__(exception_type, exception_value, traceback) | |
|
220 | if self._output == 'blackbox': | |
|
221 | val = 'Profile:\n%s' % self._fp.getvalue() | |
|
222 | # ui.log treats the input as a format string, | |
|
223 | # so we need to escape any % signs. | |
|
224 | val = val.replace('%', '%%') | |
|
225 | self._ui.log('profile', val) | |
|
217 | if self._profiler is not None: | |
|
218 | self._profiler.__exit__(exception_type, exception_value, traceback) | |
|
219 | if self._output == 'blackbox': | |
|
220 | val = 'Profile:\n%s' % self._fp.getvalue() | |
|
221 | # ui.log treats the input as a format string, | |
|
222 | # so we need to escape any % signs. | |
|
223 | val = val.replace('%', '%%') | |
|
224 | self._ui.log('profile', val) | |
|
226 | 225 | self._closefp() |
|
227 | 226 | |
|
228 | 227 | def _closefp(self): |
General Comments 0
You need to be logged in to leave comments.
Login now