[GRASS-SVN] r69849 - grass/branches/releasebranch_7_2/scripts/r.in.wms

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Nov 19 03:28:23 PST 2016


Author: martinl
Date: 2016-11-19 03:28:23 -0800 (Sat, 19 Nov 2016)
New Revision: 69849

Modified:
   grass/branches/releasebranch_7_2/scripts/r.in.wms/wms_base.py
Log:
r.in.wms crashes if server does not exist (relbr72 merge 69848 from trunk, see #3212)

Modified: grass/branches/releasebranch_7_2/scripts/r.in.wms/wms_base.py
===================================================================
--- grass/branches/releasebranch_7_2/scripts/r.in.wms/wms_base.py	2016-11-19 11:20:55 UTC (rev 69848)
+++ grass/branches/releasebranch_7_2/scripts/r.in.wms/wms_base.py	2016-11-19 11:28:23 UTC (rev 69849)
@@ -6,7 +6,7 @@
  - wms_base::GRASSImporter
  - wms_base::WMSDriversInfo
 
-(C) 2012-2013 by the GRASS Development Team
+(C) 2012-2016 by the GRASS Development Team
 
 This program is free software under the GNU General Public License
 (>=v2). Read the file COPYING that comes with GRASS for details.
@@ -246,10 +246,13 @@
                     _("Authorization failed to <%s> when fetching capabilities") %
                     options['url'])
             else:
-                msg = _("Unable to fetch capabilities from <%s>: %s") % (options['url'], e)
+                msg = _("Unable to fetch capabilities from <{}>. Reason: ").format(
+                    options['url'])
 
                 if hasattr(e, 'reason'):
-                    msg += _("\nReason: ") + e.reason
+                    msg += '{}'.format(e.reason)
+                else:
+                    msg += '{}'.format(e)
 
                 grass.fatal(msg)
 



More information about the grass-commit mailing list