##// END OF EJS Templates
profile: properly propagate exception from the sub-context manager...
marmoute -
r32810:6675d23d default
parent child Browse files
Show More
@@ -214,8 +214,10 class profile(object):
214 214 raise
215 215
216 216 def __exit__(self, exception_type, exception_value, traceback):
217 propagate = None
217 218 if self._profiler is not None:
218 self._profiler.__exit__(exception_type, exception_value, traceback)
219 propagate = self._profiler.__exit__(exception_type, exception_value,
220 traceback)
219 221 if self._output == 'blackbox':
220 222 val = 'Profile:\n%s' % self._fp.getvalue()
221 223 # ui.log treats the input as a format string,
@@ -223,6 +225,7 class profile(object):
223 225 val = val.replace('%', '%%')
224 226 self._ui.log('profile', val)
225 227 self._closefp()
228 return propagate
226 229
227 230 def _closefp(self):
228 231 if self._fpdoclose and self._fp is not None:
General Comments 0
You need to be logged in to leave comments. Login now