[GRASS-SVN] r54734 - grass/trunk/scripts/g.extension
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 21 09:52:13 PST 2013
Author: martinl
Date: 2013-01-21 09:52:13 -0800 (Mon, 21 Jan 2013)
New Revision: 54734
Modified:
grass/trunk/scripts/g.extension/g.extension.py
Log:
g.extension: fix installation process when metadata file is broken or not available
Modified: grass/trunk/scripts/g.extension/g.extension.py
===================================================================
--- grass/trunk/scripts/g.extension/g.extension.py 2013-01-21 17:46:56 UTC (rev 54733)
+++ grass/trunk/scripts/g.extension/g.extension.py 2013-01-21 17:52:13 UTC (rev 54734)
@@ -572,7 +572,12 @@
bList = []
try:
f = urlopen(url)
- tree = etree.fromstring(f.read())
+ try:
+ tree = etree.fromstring(f.read())
+ except:
+ grass.warning(_("Unable to parse '%s'. Metadata file not updated.") % url)
+ return bList
+
for mnode in tree.findall('task'):
name = mnode.get('name')
if name not in mlist:
More information about the grass-commit
mailing list