Skip to content
Permalink
Browse files
fix error when output file is not created
git-svn-id: http://svn.osgeo.org/qgis/trunk@15577 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Mar 23, 2011
1 parent 636328d commit 1e6c095171d622e1e25993b270e66d3759ded28f
@@ -80,6 +80,6 @@ def getOutputFileName(self):

def addLayerIntoCanvas(self, fileInfo):
vl = self.iface.addVectorLayer(fileInfo.filePath(), "contour", "ogr")
if vl.isValid():
if vl != None and vl.isValid():
if hasattr(self, 'lastEncoding'):
vl.setProviderEncoding(self.lastEncoding)
@@ -81,6 +81,6 @@ def getOutputFileName(self):

def addLayerIntoCanvas(self, fileInfo):
vl = self.iface.addVectorLayer(fileInfo.filePath(), fileInfo.baseName(), "ogr")
if vl.isValid():
if vl != None and vl.isValid():
if hasattr(self, 'lastEncoding'):
vl.setProviderEncoding(self.lastEncoding)
@@ -69,6 +69,6 @@ def getOutputFileName( self ):

def addLayerIntoCanvas( self, fileInfo ):
vl = self.iface.addVectorLayer( fileInfo.filePath(), fileInfo.baseName(), "ogr" )
if vl.isValid():
if vl != None and vl.isValid():
if hasattr( self, 'lastEncoding' ):
vl.setProviderEncoding( self.lastEncoding )

0 comments on commit 1e6c095

Please sign in to comment.