From df5b22e5456d21e58528eb2f3bb5a1860d6a6841 Mon Sep 17 00:00:00 2001 From: cahrens Date: Fri, 20 Dec 2013 12:52:08 -0500 Subject: [PATCH] Fix exception to support unicode (and print url_name). Part of STUD-868 --- common/lib/xmodule/xmodule/xml_module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/xml_module.py b/common/lib/xmodule/xmodule/xml_module.py index e692dfb21c..47682b8ea2 100644 --- a/common/lib/xmodule/xmodule/xml_module.py +++ b/common/lib/xmodule/xmodule/xml_module.py @@ -387,7 +387,10 @@ class XmlDescriptor(XModuleDescriptor): try: xml_object.set(attr, val) except Exception, e: - logging.exception('Failed to serialize metadata attribute {0} with value {1}. This could mean data loss!!! Exception: {2}'.format(attr, val, e)) + logging.exception( + u'Failed to serialize metadata attribute %s with value %s in module %s. This could mean data loss!!! Exception: %s', + attr, val, self.url_name, e + ) pass for key, value in self.xml_attributes.items():