[pypy-svn] r35346 - pypy/dist/pypy/translator/js

fijal at codespeak.net fijal at codespeak.net
Tue Dec 5 22:57:24 CET 2006


Author: fijal
Date: Tue Dec  5 22:57:22 2006
New Revision: 35346

Modified:
   pypy/dist/pypy/translator/js/tester.py
Log:
Relax a bit...


Modified: pypy/dist/pypy/translator/js/tester.py
==============================================================================
--- pypy/dist/pypy/translator/js/tester.py	(original)
+++ pypy/dist/pypy/translator/js/tester.py	Tue Dec  5 22:57:22 2006
@@ -14,6 +14,9 @@
     # otherwise....
     def wrapper(*args, **kwargs):
         args = list(args)
+        # do this only if last arg is callable
+        if not (len(args) > 0 and callable(args[-1])):
+            return val(*args, **kwargs)
         callback = args.pop()
         res = val(*args, **kwargs)
         if not hasattr(self, '__callbacks'):



More information about the Pypy-commit mailing list