From: Zac Medico Date: Wed, 1 Sep 2010 15:37:11 +0000 (-0700) Subject: In ensure_dirs(), only call apply_permissions() when keyword arguments X-Git-Tag: v2.2_rc73~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=256d04c35bdd166aaf7bc46d93bb9246cd064bb7;p=portage.git In ensure_dirs(), only call apply_permissions() when keyword arguments for it are given. --- diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 2c22949a4..b11222d00 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -1042,7 +1042,7 @@ def write_atomic(file_path, content, **kwargs): else: raise -def ensure_dirs(dir_path, *args, **kwargs): +def ensure_dirs(dir_path, **kwargs): """Create a directory and call apply_permissions. Returns True if a directory is created or the permissions needed to be modified, and False otherwise.""" @@ -1070,7 +1070,10 @@ def ensure_dirs(dir_path, *args, **kwargs): raise ReadOnlyFileSystem(func_call) else: raise - perms_modified = apply_permissions(dir_path, *args, **kwargs) + if kwargs: + perms_modified = apply_permissions(dir_path, **kwargs) + else: + perms_modified = False return created_dir or perms_modified class LazyItemsDict(UserDict):