[GRASS-SVN] r60117 - grass/trunk/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 5 12:09:10 PDT 2014


Author: martinl
Date: 2014-05-05 12:09:09 -0700 (Mon, 05 May 2014)
New Revision: 60117

Modified:
   grass/trunk/lib/python/script/task.py
Log:
libpython: fix grass-interface.dtd location

Modified: grass/trunk/lib/python/script/task.py
===================================================================
--- grass/trunk/lib/python/script/task.py	2014-05-05 17:32:48 UTC (rev 60116)
+++ grass/trunk/lib/python/script/task.py	2014-05-05 19:09:09 UTC (rev 60117)
@@ -455,7 +455,7 @@
 def get_interface_description(cmd):
     """!Returns the XML description for the GRASS cmd (force text encoding to "utf-8").
 
-    The DTD must be located in $GISBASE/etc/grass-interface.dtd,
+    The DTD must be located in $GISBASE/gui/xml/grass-interface.dtd,
     otherwise the parser will not succeed.
 
     @param cmd command (name of GRASS module)
@@ -490,11 +490,7 @@
         raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."
                              "\n\nDetails: %(det)s") % { 'cmd' : cmd, 'det' : e }
     
-    # if cmderr and cmderr[:7] != 'WARNING':
-    # raise ScriptError, _("Unable to fetch interface description for command '%(cmd)s'."
-    # "\n\nDetails: %(det)s") % { 'cmd': cmd, 'det' : decode(cmderr) }
-    
-    desc = cmdout.replace('grass-interface.dtd', os.path.join(os.getenv('GISBASE'), 'etc', 'grass-interface.dtd'))
+    desc = cmdout.replace('grass-interface.dtd', os.path.join(os.getenv('GISBASE'), 'gui', 'xml', 'grass-interface.dtd'))
     return convert_xml_to_utf8(desc)
 
 def parse_interface(name, parser = processTask, blackList = None):



More information about the grass-commit mailing list