[GRASS-SVN] r69850 - grass/branches/releasebranch_7_0/scripts/r.in.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 19 03:35:20 PST 2016
Author: martinl
Date: 2016-11-19 03:35:20 -0800 (Sat, 19 Nov 2016)
New Revision: 69850
Modified:
grass/branches/releasebranch_7_0/scripts/r.in.wms/wms_base.py
Log:
r.in.wms crashes if server does not exist (relbr72 merge 69848 from trunk, fix #3212)
Modified: grass/branches/releasebranch_7_0/scripts/r.in.wms/wms_base.py
===================================================================
--- grass/branches/releasebranch_7_0/scripts/r.in.wms/wms_base.py 2016-11-19 11:28:23 UTC (rev 69849)
+++ grass/branches/releasebranch_7_0/scripts/r.in.wms/wms_base.py 2016-11-19 11:35:20 UTC (rev 69850)
@@ -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.
@@ -225,10 +225,13 @@
if urllib2.HTTPError == type(e) and e.code == 401:
grass.fatal(_("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