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@13263 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Apr 6, 2010
1 parent 243e766 commit ba73157
Showing 1 changed file with 5 additions and 2 deletions.
@@ -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 ba73157

Please sign in to comment.