aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-08-31 21:39:38 -0700
committerBrian Dolbec <dolsen@gentoo.org>2015-08-31 21:40:55 -0700
commit8035e2073b3bb7ca3125627a9671b63239f0537f (patch)
treeb57b5ba2e74204e006cfbd91c0c409f281828062
parentby request, keep consistant double quotes; fixing sed removal of bindist in c... (diff)
downloadcatalyst-8035e207.tar.gz
catalyst-8035e207.tar.bz2
catalyst-8035e207.zip
fileops.py: Fix a bug where the mode was not being passed
Change the default mode to 0o755
-rw-r--r--catalyst/fileops.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/catalyst/fileops.py b/catalyst/fileops.py
index fd98db25..129d967b 100644
--- a/catalyst/fileops.py
+++ b/catalyst/fileops.py
@@ -21,7 +21,7 @@ from snakeoil.osutils import (ensure_dirs as snakeoil_ensure_dirs,
from catalyst.support import CatalystError
-def ensure_dirs(path, gid=-1, uid=-1, mode=0777, minimal=True,
+def ensure_dirs(path, gid=-1, uid=-1, mode=0o755, minimal=True,
failback=None, fatal=False):
'''Wrapper to snakeoil.osutil's ensure_dirs()
This additionally allows for failures to run
@@ -40,7 +40,7 @@ def ensure_dirs(path, gid=-1, uid=-1, mode=0777, minimal=True,
:return: True if the directory could be created/ensured to have those
permissions, False if not.
'''
- succeeded = snakeoil_ensure_dirs(path, gid=-1, uid=-1, mode=0777, minimal=True)
+ succeeded = snakeoil_ensure_dirs(path, gid=-1, uid=-1, mode=mode, minimal=True)
if not succeeded:
if failback:
failback()
@@ -50,7 +50,7 @@ def ensure_dirs(path, gid=-1, uid=-1, mode=0777, minimal=True,
return succeeded
-def clear_dir(target, mode=0755, chg_flags=False, remove=False):
+def clear_dir(target, mode=0o755, chg_flags=False, remove=False):
'''Universal directory clearing function
@target: string, path to be cleared or removed