From dc8f23d6ae123ece894e1090cd317764c81f1a78 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Thu, 10 Jan 2013 14:41:19 -0500 Subject: [PATCH] the parent directory might not already exist, so we have to call makedir with recursive=true to auto-create any parent folders --- common/lib/xmodule/xmodule/xml_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index bbbd676a4d..c9d5f2356c 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -379,7 +379,7 @@ class XmlDescriptor(XModuleDescriptor): # Write the definition to a file url_path = name_to_pathname(self.url_name) filepath = self.__class__._format_filepath(self.category, url_path) - resource_fs.makedir(os.path.dirname(filepath), allow_recreate=True) + resource_fs.makedir(os.path.dirname(filepath), recursive=True, allow_recreate=True) with resource_fs.open(filepath, 'w') as file: file.write(etree.tostring(xml_object, pretty_print=True, encoding='utf-8'))