Fixed a problem where an exception could be raised when reporting an exception during draft XML processing to the user.

- Legacy-Id: 15491
This commit is contained in:
Henrik Levkowetz 2018-09-27 13:36:25 +00:00
parent 3756923f40
commit c14b02cfa4

View file

@ -148,7 +148,7 @@ class SubmissionBaseUploadForm(forms.Form):
self.xmltree = parser.parse(normalize=True)
ok, errors = self.xmltree.validate()
except Exception as exc:
raise forms.ValidationError("An exception occurred when trying to process the XML file: %s" % exc.msg)
raise forms.ValidationError("An exception occurred when trying to process the XML file: %s" % exc)
if not ok:
# Each error has properties:
#