Skip to content

Commit

Permalink
Fixed a crash in the plugin that occurs when the epsg code for a web …
Browse files Browse the repository at this point in the history
…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.
7 changes: 5 additions & 2 deletions python/plugins/mapserver_export/ms_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ba73157

Please sign in to comment.