ソースを参照

g.extension: scan svn when module.xml is not available or broken

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54730 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年 前
コミット
0b3c066d9a
1 ファイル変更5 行追加3 行削除
  1. 5 3
      scripts/g.extension/g.extension.py

+ 5 - 3
scripts/g.extension/g.extension.py

@@ -7,7 +7,7 @@
 #               Pythonized & upgraded for GRASS 7 by Martin Landa <landa.martin gmail.com>
 # PURPOSE:      Tool to download and install extensions from GRASS Addons SVN into 
 #               local GRASS installation
-# COPYRIGHT:    (C) 2009-2012 by Markus Neteler, and the GRASS Development Team
+# COPYRIGHT:    (C) 2009-2013 by Markus Neteler, and the GRASS Development Team
 #
 #               This program is free software under the GNU General
 #               Public License (>=v2). Read the file COPYING that
@@ -293,8 +293,10 @@ def list_available_modules(url, mlist = None):
         try:
             tree = etree.fromstring(f.read())
         except:
-            grass.fatal(_("Unable to parse '%s'") % url)
-
+            grass.warning(_("Unable to parse '%s'. Trying to scan SVN (may take some time)...") % url)
+            list_available_extensions_svn()
+            return
+        
         for mnode in tree.findall('task'):
             name = mnode.get('name').strip()
             if mlist and name not in mlist: