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.
pull/17072/head
Monty Taylor 8 years ago committed by Brian Coca
parent 70e63ddf6c
commit cd6e01349e

@ -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…
Cancel
Save