##// END OF EJS Templates
don't double-decorate in `flag_calls`
MinRK -
Show More
@@ -33,6 +33,10 b' def flag_calls(func):'
33
33
34 Testing for truth in wrapper.called allows you to determine if a call to
34 Testing for truth in wrapper.called allows you to determine if a call to
35 func() was attempted and succeeded."""
35 func() was attempted and succeeded."""
36
37 # don't wrap twice
38 if hasattr(func, 'called'):
39 return func
36
40
37 def wrapper(*args,**kw):
41 def wrapper(*args,**kw):
38 wrapper.called = False
42 wrapper.called = False
General Comments 0
You need to be logged in to leave comments. Login now