diff options
author | Joe Onorato <joeo@google.com> | 2013-01-11 12:35:53 -0800 |
---|---|---|
committer | Conley Owens <cco3@android.com> | 2013-01-17 09:10:00 -0800 |
commit | 26e2475a0fe090f5bd2c0a0a040f21cc71aac095 (patch) | |
tree | 3df2016a6bd52802151917b4c35a8e07f0d6d16f | |
parent | c59bafffb972dedd279e16a3a34415cda2ce3f58 (diff) | |
download | git-repo-26e2475a0fe090f5bd2c0a0a040f21cc71aac095.tar.gz |
If parsing the manifests fails, reset the XmlManifest object
so that if it's called again, we see the correct errors.
Change-Id: I909488feeac04aecfc92a9b5d6fb17827ef2f213
-rw-r--r-- | manifest_xml.py | 8 |
1 files changed, 7 insertions, 1 deletions
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): | |||
352 | except OSError: | 352 | except OSError: |
353 | pass | 353 | pass |
354 | 354 | ||
355 | self._ParseManifest(nodes) | 355 | try: |
356 | self._ParseManifest(nodes) | ||
357 | except ManifestParseError as e: | ||
358 | # There was a problem parsing, unload ourselves in case they catch | ||
359 | # this error and try again later, we will show the correct error | ||
360 | self._Unload() | ||
361 | raise e | ||
356 | 362 | ||
357 | if self.IsMirror: | 363 | if self.IsMirror: |
358 | self._AddMetaProjectMirror(self.repoProject) | 364 | self._AddMetaProjectMirror(self.repoProject) |