Commit df5b22e5 by cahrens

Fix exception to support unicode (and print url_name).

Part of STUD-868
parent ce18bcec
......@@ -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():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment