diff --git a/manifest_xml.py b/manifest_xml.py index cdee87a6..bf981f03 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -310,7 +310,11 @@ class XmlManifest(object): self._loaded = True def _ParseManifestXml(self, path, include_root): - root = xml.dom.minidom.parse(path) + try: + root = xml.dom.minidom.parse(path) + except (OSError, xml.parsers.expat.ExpatError), e: + raise ManifestParseError("error parsing manifest %s: %s" % (path, e)) + if not root or not root.childNodes: raise ManifestParseError("no root node in %s" % (path,))