def task(f): """ fabric task - where strings 'false'/'true' are passed as boolean False/True instead. fabric does not sanitizes bool strings, e.g. fab deploy:config=False will pass 'False' instead of False (and 'False' evaluates to True, so that is a problem) """ return _task(fix_boolean(f))
def task(function): name = function.__name__ def wrapped(*args,**kwargs): console('executing %s...' % name) return function(*args,**kwargs) wrapped.__name__ = name return _task(wrapped)
def task(function): name = function.__name__ def wrapped(*args, **kwargs): console('executing %s...' % name) return function(*args, **kwargs) wrapped.__name__ = name return _task(wrapped)
def gh_task(f): """ fabric task - where strings 'false'/'true' are passed as boolean False/True instead. fabric does not sanitizes bool strings, e.g. fab deploy:config=False will pass 'False' instead of False (and 'False' evaluates to True, so that is a problem) """ @wraps(f) def g(*args, **kwargs): setup_env_for_user() f(*args, **kwargs) return _task(_fix_boolean(g))