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