Skip to content
Permalink
Browse files
Fixed a crash in the plugin that occurs when the epsg code for a web …
…section cannot be parsed

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13263 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Apr 6, 2010
1 parent 2064aa7 commit a049be1985db4a1daed4212f762ee462934d9552
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/mapserver_export/ms_export.py
@@ -382,8 +382,11 @@ def writeWebSection(self):
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")

0 comments on commit a049be1

Please sign in to comment.