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'))