diff --git a/cms/envs/dev.py b/cms/envs/dev.py index 5bc5cfebc5..b4bcbfa9ce 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -3,6 +3,10 @@ This config file runs the simplest dev environment""" from .common import * +import logging +import sys +logging.basicConfig(stream=sys.stdout, ) + DEBUG = True TEMPLATE_DEBUG = DEBUG diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index f860e70afb..aebb024a59 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -2,7 +2,9 @@ from collections import MutableMapping from xmodule.x_module import XModuleDescriptor from lxml import etree import copy +import logging +log = logging.getLogger(__name__) class LazyLoadingDict(MutableMapping): """ @@ -124,7 +126,11 @@ class XmlDescriptor(XModuleDescriptor): else: filepath = cls._format_filepath(xml_object.tag, filename) with system.resources_fs.open(filepath) as file: - definition_xml = etree.parse(file).getroot() + try: + definition_xml = etree.parse(file).getroot() + except: + log.exception("Failed to parse xml in file %s" % filepath) + raise cls.clean_metadata_from_xml(definition_xml) return cls.definition_from_xml(definition_xml, system)