Skip to content

Commit 1f8cc48

Browse files
committed
Use decorator.decorator consistenly in debug wrappers.
- Legacy-Id: 4936
1 parent ba95520 commit 1f8cc48

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

debug.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,8 @@ def wrapper(*args, **kwargs):
130130
retval = prof.runcall(fn, *args, **kwargs)
131131
prof.dump_stats(datafn)
132132
return retval
133-
return wrapper
133+
if debug:
134+
return decorator(wrapper, fn)
135+
else:
136+
return fn
134137

0 commit comments

Comments
 (0)