Skip to content
Browse files

Merge pull request #102 from hrbonz/print_timing_decorator

fix bad decorator call (print_timing) by using *args and **kwargs
  • Loading branch information...
2 parents c614014 + e760db3 commit a857aef24b5bc80018d33f1131e6bd90ed30e270 @Kronuz committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 scss/__init__.py
View
6 scss/__init__.py
@@ -490,16 +490,16 @@ def spawn_rule(rule=None, **kwargs):
def print_timing(level=0):
def _print_timing(func):
if VERBOSITY:
- def wrapper(*arg):
+ def wrapper(*args, **kwargs):
if VERBOSITY >= level:
t1 = time.time()
- res = func(*arg)
+ res = func(*args, **kwargs)
t2 = time.time()
profiling.setdefault(func.func_name, 0)
profiling[func.func_name] += (t2 - t1)
return res
else:
- return func(*arg)
+ return func(*args, **kwargs)
return wrapper
else:
return func

0 comments on commit a857aef

Please sign in to comment.
Something went wrong with that request. Please try again.