Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed completed_ok decorator usage

  • Loading branch information...
commit bec9f3914d096c9fa21d80780b4e2b24b63297bd 1 parent 8f9d75e
@dexterbt1 authored
Showing with 8 additions and 10 deletions.
  1. +8 −10 src/cuisine_sweet/utils.py
View
18 src/cuisine_sweet/utils.py
@@ -12,16 +12,14 @@ def this_func(level=1):
def completed_ok(arg_output=[]):
- def wrap(func):
- def wrapped_f(*args, **kwargs):
- r = func(*args, **kwargs)
- out = []
- for i in arg_output:
- out.append(args[i])
- puts(green('%s.%s(%s): OK' % (func.__module__, func.__name__, ', '.join(out))))
- return r
- return wrapped_f
- return decorator(wrap) # needed to preserve: func signature, docstring, name
+ def wrapped_f(func, *args, **kwargs):
+ r = func(*args, **kwargs)
+ out = []
+ for i in arg_output:
+ out.append(args[i])
+ puts(green('%s.%s(%s): OK' % (func.__module__, func.__name__, ', '.join(out))))
+ return r
+ return decorator(wrapped_f) # needed to preserve: func signature, docstring, name
def local_run_expect(cmd, prompts, answers, logfile=sys.stdout):
Please sign in to comment.
Something went wrong with that request. Please try again.