[GRASS-SVN] r74338 - grass/trunk/scripts/r.in.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 3 02:26:56 PDT 2019
Author: neteler
Date: 2019-04-03 02:26:56 -0700 (Wed, 03 Apr 2019)
New Revision: 74338
Modified:
grass/trunk/scripts/r.in.wms/wms_drv.py
Log:
r.in.wms: catch incorrect WMS url input
Modified: grass/trunk/scripts/r.in.wms/wms_drv.py
===================================================================
--- grass/trunk/scripts/r.in.wms/wms_drv.py 2019-04-02 16:31:49 UTC (rev 74337)
+++ grass/trunk/scripts/r.in.wms/wms_drv.py 2019-04-03 09:26:56 UTC (rev 74338)
@@ -58,6 +58,7 @@
@return temp_map with downloaded data
"""
grass.message(_("Downloading data from WMS server..."))
+ server_url = self.params["url"]
if "?" in self.params["url"]:
self.params["url"] += "&"
@@ -182,6 +183,8 @@
grass.fatal(_("WMS server unknown error"))
temp_tile_pct2rgb = None
+ if tile_dataset_info.RasterCount < 1:
+ grass.fatal(_("WMS server error: no band(s) received. Is server URL correct? <%s>") % server_url )
if tile_dataset_info.RasterCount == 1 and \
tile_dataset_info.GetRasterBand(1).GetRasterColorTable() is not None:
# expansion of color table into bands
More information about the grass-commit
mailing list