示例#1
0
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))
示例#2
0
文件: fabfile.py 项目: jsalva/haxclub
def task(function):
    name = function.__name__
    def wrapped(*args,**kwargs):
        console('executing %s...' % name)
        return function(*args,**kwargs)

    wrapped.__name__ = name
    return _task(wrapped)
示例#3
0
def task(function):
    name = function.__name__

    def wrapped(*args, **kwargs):
        console('executing %s...' % name)
        return function(*args, **kwargs)

    wrapped.__name__ = name
    return _task(wrapped)
示例#4
0
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))