コード例 #1
0
ファイル: reality.py プロジェクト: isnok/fabric-projects
def really():

    """ Enable command execution. """

    setenv(really=True)
コード例 #2
0
ファイル: reality.py プロジェクト: isnok/fabric-projects
def notreally():

    """ Disable command execution. (default) """

    setenv(really=False)
コード例 #3
0
ファイル: reality.py プロジェクト: isnok/fabric-projects
""" reality is the main source of fabric-projects' default behaviour of not executing tasks without explicitly stating that action should 'really' be taken. """

##
#  Config value handling (or how to overdo getting one bool from the config into the env dict.)
##

from fabfile.ConfigHandling import get_bool

really = get_bool("fabfile", "really")

from fabfile.EyeCandy import setenv

if really:
    setenv(really=really)  # colored output
else:
    from fabric.api import env

    env["really"] = really


##
#  The tasks to control 'reallynes'
##

from fabfile.FabHacks import maintask


@maintask
def really():

    """ Enable command execution. """