[pypy-svn] r78713 - pypy/branch/fast-forward/pypy/module/_lsprof
afa at codespeak.net
afa at codespeak.net
Fri Nov 5 01:35:59 CET 2010
Author: afa
Date: Fri Nov 5 01:35:57 2010
New Revision: 78713
Modified:
pypy/branch/fast-forward/pypy/module/_lsprof/interp_lsprof.py
Log:
The profiler timer function is not allowed to raise.
Modified: pypy/branch/fast-forward/pypy/module/_lsprof/interp_lsprof.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/_lsprof/interp_lsprof.py (original)
+++ pypy/branch/fast-forward/pypy/module/_lsprof/interp_lsprof.py Fri Nov 5 01:35:57 2010
@@ -212,7 +212,12 @@
def timer(self):
if self.w_callable:
space = self.space
- return space.float_w(space.call_function(self.w_callable))
+ try:
+ return space.float_w(space.call_function(self.w_callable))
+ except OperationError, e:
+ e.write_unraisable(space, "timer function ",
+ self.w_callable)
+ return 0.0
return time.time()
def enable(self, space, w_subcalls=NoneNotWrapped,
More information about the Pypy-commit
mailing list