Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Commit

Permalink
fabfile: fix wrong interpretation of boolean variables read from .ini…
Browse files Browse the repository at this point in the history
… files
  • Loading branch information
swergas committed Dec 15, 2016
1 parent 10f5ac9 commit 836c9f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ def virtuoso_db_directory():


def database_dump_virtuoso():
# This next command can ask you to type password for the {{env.user}} user
if not exists(env.dbdumps_dir):
run('mkdir -m700 %s' % env.dbdumps_dir)

Expand Down Expand Up @@ -1742,7 +1743,8 @@ def sanitize_env():
"uses_memcache ", "uses_uwsgi", "uses_apache", "uses_ngnix",
"uses_global_supervisor", "using_virtuoso", "uses_apache",
"uses_ngnix", "mac", "is_production_env"):
setattr(env, name, bool(getattr(env, name, False)))
# Note that we use as_bool() instead of bool(), so that a variable valued "False" in the .ini file is recognized as boolean False
setattr(env, name, as_bool(getattr(env, name, False)))
if not isinstance(env.hosts, list):
env.hosts = getattr(env, "hosts", "").split()

Expand Down

0 comments on commit 836c9f5

Please sign in to comment.