Ejemplo n.º 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))
Ejemplo n.º 2
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)
Ejemplo n.º 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)
Ejemplo n.º 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))