[GRASS-SVN] r56783 - grass/branches/releasebranch_6_4/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 18 04:09:17 PDT 2013
Author: hamish
Date: 2013-06-18 04:09:16 -0700 (Tue, 18 Jun 2013)
New Revision: 56783
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/modules/ogc_services.py
Log:
abort if the xml2 parser isn't found (#820, #1163; merge from devbr6)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/modules/ogc_services.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/modules/ogc_services.py 2013-06-18 11:06:38 UTC (rev 56782)
+++ grass/branches/releasebranch_6_4/gui/wxpython/modules/ogc_services.py 2013-06-18 11:09:16 UTC (rev 56783)
@@ -21,8 +21,9 @@
from wx.gizmos import TreeListCtrl
import wx.lib.mixins.listctrl as listmix
-from core.gcmd import RunCommand
+from core.gcmd import GError, RunCommand
from core.settings import UserSettings
+from grass.script.core import find_program
class WMSDialog(wx.Dialog):
def __init__(self, parent, service = 'wms',
@@ -160,6 +161,14 @@
def OnConnect(self, event):
"""!Button 'Connect' pressed"""
+ # 'r.in.wms -l' output changes depending on the parser used.
+ # the parsing below depends on the cleaner `xml2` version.
+ if not find_program('xml2'):
+ GError(_("The 'xml2' parser is required, please install it "
+ "first. You may also try running r.in.wms directly "
+ "from the command line."))
+ return
+
server = self.server.GetValue()
if not server:
self.btn_import.Enable(False)
More information about the grass-commit
mailing list