mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Ensure parent tempdir's existence (#17585)
While doing evil things with action plugins, I hit a code path in which the mkdir here was failing due to lack of parent dir. Changing this to makedirs made everything happy. Now, I'd obviously like to understand why the parent dir exists in some places and not others - but I could not find anywhere that C.DEFAULT_LOCAL_TMP is ensured to be created.
This commit is contained in:
parent
70e63ddf6c
commit
cd6e01349e
1 changed files with 1 additions and 1 deletions
|
@ -647,7 +647,7 @@ def _find_snippet_imports(module_name, module_data, module_path, module_args, ta
|
|||
if not os.path.exists(lookup_path):
|
||||
# Note -- if we have a global function to setup, that would
|
||||
# be a better place to run this
|
||||
os.mkdir(lookup_path)
|
||||
os.makedirs(lookup_path)
|
||||
display.debug('ANSIBALLZ: Writing module')
|
||||
with open(cached_module_filename + '-part', 'wb') as f:
|
||||
f.write(zipdata)
|
||||
|
|
Loading…
Reference in a new issue