[jhbuild] do not fallback to local moduleset copy on parsing errors
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] do not fallback to local moduleset copy on parsing errors
- Date: Thu, 23 Apr 2009 16:15:33 -0400 (EDT)
commit d0ce234bc10cf5b01743302c1328ed03ac2f4b6f
Author: Frederic Peters <fpeters 0d be>
Date: Thu Apr 23 22:13:21 2009 +0200
do not fallback to local moduleset copy on parsing errors
Only catch the XML parsing exception for the final modulesets, to avoid a
silent fallback to the modulesets shipped with jhbuild when they share
identical names. (GNOME #579552)
---
jhbuild/moduleset.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/jhbuild/moduleset.py b/jhbuild/moduleset.py
index c1ecd27..556f496 100644
--- a/jhbuild/moduleset.py
+++ b/jhbuild/moduleset.py
@@ -287,7 +287,10 @@ def load(config, uri=None):
uri = os.path.join(config.modulesets_dir, uri + '.modules')
else:
uri = 'http://git.gnome.org/cgit/jhbuild/plain/modulesets/%s.modules' % uri
- ms.modules.update(_parse_module_set(config, uri).modules)
+ try:
+ ms.modules.update(_parse_module_set(config, uri).modules)
+ except xml.parsers.expat.ExpatError, e:
+ raise FatalError(_('failed to parse %s: %s') % (uri, e))
return ms
def load_tests (config, uri=None):
@@ -318,8 +321,6 @@ def _parse_module_set(config, uri):
document = xml.dom.minidom.parse(filename)
except IOError, e:
raise FatalError(_('failed to parse %s: %s') % (filename, e))
- except xml.parsers.expat.ExpatError, e:
- raise FatalError(_('failed to parse %s: %s') % (filename, e))
assert document.documentElement.nodeName == 'moduleset'
moduleset = ModuleSet(config = config)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]