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