From: Guillaume Pellerin Date: Thu, 26 Dec 2013 15:00:50 +0000 (+0100) Subject: fix xml exception X-Git-Tag: 1.4.5~2^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=865e008b13ad0213761e60432dfbf03354d32878;p=telemeta.git fix xml exception --- diff --git a/telemeta/util/xmltodict2.py b/telemeta/util/xmltodict2.py index 11c7fd06..b0fb4589 100644 --- a/telemeta/util/xmltodict2.py +++ b/telemeta/util/xmltodict2.py @@ -185,7 +185,8 @@ def xmltodict(xml, attsToSkip=[], addCodeFile=False): except expat.ExpatError: errmsg = "An invalid XML string was encountered" if errmsg: - raise Exception.XmlException, errmsg + raise Exception(errmsg) + if addCodeFile and isPath: # Get the associated code file, if any codePth = "%s-code.py" % os.path.splitext(xml)[0]