diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-11-22 13:48:10 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-02-17 21:20:20 +0900 |
commit | 5f434ed723ac14cdcea12d038c066c0653e1ef3a (patch) | |
tree | 259f4860618f544f8ff96e1c9684ff89e5812bc4 | |
parent | 606eab804302a92d232735d4aa57853cf3be3d9a (diff) | |
download | git-repo-5f434ed723ac14cdcea12d038c066c0653e1ef3a.tar.gz |
Exit with fatal error if local manifest file cannot be parsed
If the .repo/local_manifests folder includes a local manifest file
that cannot be parsed, the current behaviour is to catch the parse
exception, print a warning, and continue to process remaining files.
This can cause any errors to go unnoticed.
Remove the exception handling, so that the exception is instead
caught in main._Main, and repo exits with a fatal error.
Change-Id: I75a70b7b850d2eb3e4ac99d435a4568ff598b7f4
-rw-r--r-- | manifest_xml.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index e8693ba8..07f0c66a 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -344,11 +344,8 @@ class XmlManifest(object): | |||
344 | try: | 344 | try: |
345 | for local_file in sorted(os.listdir(local_dir)): | 345 | for local_file in sorted(os.listdir(local_dir)): |
346 | if local_file.endswith('.xml'): | 346 | if local_file.endswith('.xml'): |
347 | try: | 347 | local = os.path.join(local_dir, local_file) |
348 | local = os.path.join(local_dir, local_file) | 348 | nodes.append(self._ParseManifestXml(local, self.repodir)) |
349 | nodes.append(self._ParseManifestXml(local, self.repodir)) | ||
350 | except ManifestParseError as e: | ||
351 | print('%s' % str(e), file=sys.stderr) | ||
352 | except OSError: | 349 | except OSError: |
353 | pass | 350 | pass |
354 | 351 | ||