From 26e2475a0fe090f5bd2c0a0a040f21cc71aac095 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Fri, 11 Jan 2013 12:35:53 -0800 Subject: [PATCH] If parsing the manifests fails, reset the XmlManifest object so that if it's called again, we see the correct errors. Change-Id: I909488feeac04aecfc92a9b5d6fb17827ef2f213 --- manifest_xml.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifest_xml.py b/manifest_xml.py index c44b9c5e..030da180 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -352,7 +352,13 @@ class XmlManifest(object): except OSError: pass - self._ParseManifest(nodes) + try: + self._ParseManifest(nodes) + except ManifestParseError as e: + # There was a problem parsing, unload ourselves in case they catch + # this error and try again later, we will show the correct error + self._Unload() + raise e if self.IsMirror: self._AddMetaProjectMirror(self.repoProject)