From 3fbba9970820512b6be02d73a90a2e579376e296 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 1 Sep 2010 08:51:41 -0700 Subject: Add a note to the ensure_dirs() docstring about atomic directory creation. --- pym/portage/util/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index aa37e8c3c..ff6302e60 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -1045,7 +1045,12 @@ def write_atomic(file_path, content, **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.""" + modified, and False otherwise. + + This function's handling of EEXIST errors makes it useful for atomic + directory creation, in which multiple processes may be competing to + create the same directory. + """ created_dir = False -- cgit v1.2.3-1-g7c22