Commits

Jason Moiron committed 8b79785

fix python2.4 support

  • Participants
  • Parent commits e797c60

Comments (0)

Files changed (1)

File johnny/tests/base.py

 """Base test class for Johnny Cache Tests."""
 
 import sys
-from functools import wraps
+from django.utils.functional import wraps
 
 import django
 from django.test import TestCase, TransactionTestCase
         print "hit:\n\t%s\n\t%s\n" % (pformat(args), pformat(kwargs))
     def _miss(*args, **kwargs):
         print "miss:\n\t%s\n\t%s\n" % (pformat(args), pformat(kwargs))
-    hit = _hit if hit is None else hit
-    miss = _miss if miss is None else miss
+    hit = hit or _hit
+    miss = miss or _miss
     def deco(func):
         @wraps(func)
         def wrapped(*args, **kwargs):
             qc_miss.connect(miss)
             try:
                 ret = func(*args, **kwargs)
-            except e:
-                raise
             finally:
                 qc_hit.disconnect(hit)
                 qc_miss.disconnect(miss)