[GRASS-SVN] r56743 - grass/branches/develbranch_6/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 16 22:17:37 PDT 2013
Author: hamish
Date: 2013-06-16 22:17:37 -0700 (Sun, 16 Jun 2013)
New Revision: 56743
Modified:
grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py
Log:
abort if the xml2 parser isn't found (#820, #1163)
Modified: grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py 2013-06-17 04:02:08 UTC (rev 56742)
+++ grass/branches/develbranch_6/gui/wxpython/modules/ogc_services.py 2013-06-17 05:17:37 UTC (rev 56743)
@@ -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,12 @@
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"))
+ return
+
server = self.server.GetValue()
if not server:
self.btn_import.Enable(False)
More information about the grass-commit
mailing list