[QGIS Commit] r13263 - trunk/qgis/python/plugins/mapserver_export
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Apr 6 11:08:38 EDT 2010
Author: timlinux
Date: 2010-04-06 11:08:37 -0400 (Tue, 06 Apr 2010)
New Revision: 13263
Modified:
trunk/qgis/python/plugins/mapserver_export/ms_export.py
Log:
Fixed a crash in the plugin that occurs when the epsg code for a web section cannot be parsed
Modified: trunk/qgis/python/plugins/mapserver_export/ms_export.py
===================================================================
--- trunk/qgis/python/plugins/mapserver_export/ms_export.py 2010-04-06 15:00:55 UTC (rev 13262)
+++ trunk/qgis/python/plugins/mapserver_export/ms_export.py 2010-04-06 15:08:37 UTC (rev 13263)
@@ -382,8 +382,11 @@
self.outFile.write("\n")
destsrs = self.qgs.getElementsByTagName("destinationsrs")[0]
- epsg = destsrs.getElementsByTagName("epsg")[0].childNodes[0].nodeValue.encode("utf-8")
-
+ try:
+ epsg = destsrs.getElementsByTagName("epsg")[0].childNodes[0].nodeValue.encode("utf-8")
+ except:
+ # default to epsg
+ epsg="4326"
self.outFile.write(" # WMS server settings\n")
self.outFile.write(" METADATA\n")
self.outFile.write(" 'ows_title' '" + self.mapName + "'\n")
More information about the QGIS-commit
mailing list