commit: 8035e2073b3bb7ca3125627a9671b63239f0537f Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Tue Sep 1 04:39:38 2015 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Tue Sep 1 04:40:55 2015 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8035e207
fileops.py: Fix a bug where the mode was not being passed Change the default mode to 0o755 catalyst/fileops.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst/fileops.py b/catalyst/fileops.py index fd98db2..129d967 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