From 85f294b3e32d9f1e20b7c7775266230b461df767 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 2 Jul 2012 11:21:40 -0400 Subject: [PATCH] Allow for no default_class in XMLModuleStore --- common/lib/xmodule/modulestore/xml.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/modulestore/xml.py b/common/lib/xmodule/modulestore/xml.py index d68a6448cc..eb23de2e46 100644 --- a/common/lib/xmodule/modulestore/xml.py +++ b/common/lib/xmodule/modulestore/xml.py @@ -30,9 +30,12 @@ class XMLModuleStore(ModuleStore): self.data_dir = path(data_dir) self.modules = {} - module_path, _, class_name = default_class.rpartition('.') - class_ = getattr(import_module(module_path), class_name) - self.default_class = class_ + if default_class is None: + self.default_class = None + else: + module_path, _, class_name = default_class.rpartition('.') + class_ = getattr(import_module(module_path), class_name) + self.default_class = class_ with open(self.data_dir / "course.xml") as course_file: class ImportSystem(XMLParsingSystem):