mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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
This commit is contained in:
parent
606eab8043
commit
5f434ed723
@ -344,11 +344,8 @@ class XmlManifest(object):
|
|||||||
try:
|
try:
|
||||||
for local_file in sorted(os.listdir(local_dir)):
|
for local_file in sorted(os.listdir(local_dir)):
|
||||||
if local_file.endswith('.xml'):
|
if local_file.endswith('.xml'):
|
||||||
try:
|
local = os.path.join(local_dir, local_file)
|
||||||
local = os.path.join(local_dir, local_file)
|
nodes.append(self._ParseManifestXml(local, self.repodir))
|
||||||
nodes.append(self._ParseManifestXml(local, self.repodir))
|
|
||||||
except ManifestParseError as e:
|
|
||||||
print('%s' % str(e), file=sys.stderr)
|
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user