aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTroy J. Farrell <troy@entheossoft.com>2012-10-13 10:40:41 -0500
committerTroy J. Farrell <troy@entheossoft.com>2012-10-13 10:40:41 -0500
commitbd234cc090cad71d59e353f2bfac281d40fa8b12 (patch)
treebe7d328e355095afbf7645d3fedb1afb0bad202f
parentPrepare 0.6.0 release (diff)
downloadfabtools-bd234cc090cad71d59e353f2bfac281d40fa8b12.tar.xz
require.directory should set ownership and mode on existing directories.
-rw-r--r--fabtools/require/files.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/fabtools/require/files.py b/fabtools/require/files.py
index bf0aefb..54f08c9 100644
--- a/fabtools/require/files.py
+++ b/fabtools/require/files.py
@@ -37,10 +37,10 @@ def directory(path, use_sudo=False, owner='', group='', mode=''):
func = use_sudo and sudo or run
if not is_dir(path):
func('mkdir -p "%(path)s"' % locals())
- if owner:
- func('chown %(owner)s:%(group)s "%(path)s"' % locals())
- if mode:
- func('chmod %(mode)s "%(path)s"' % locals())
+ if owner:
+ func('chown %(owner)s:%(group)s "%(path)s"' % locals())
+ if mode:
+ func('chmod %(mode)s "%(path)s"' % locals())
def file(path=None, contents=None, source=None, url=None, md5=None,