Skip to content

Commit cf02a71

Browse files
committedJan 21, 2016
get rid of multiple inheritance, fix missed import
1 parent fe2bb2f commit cf02a71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎python/plugins/processing/algs/gdal/ClipByMask.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
from osgeo import gdal
2929

30-
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
31-
3230
from processing.core.parameters import ParameterRaster
3331
from processing.core.parameters import ParameterVector
3432
from processing.core.parameters import ParameterBoolean
@@ -41,8 +39,10 @@
4139
from processing.algs.gdal.OgrAlgorithm import OgrAlgorithm
4240
from processing.algs.gdal.GdalUtils import GdalUtils
4341

42+
from processing.tools import dataobjects
43+
4444

45-
class ClipByMask(GdalAlgorithm, OgrAlgorithm):
45+
class ClipByMask(OgrAlgorithm):
4646

4747
INPUT = 'INPUT'
4848
OUTPUT = 'OUTPUT'
@@ -149,7 +149,7 @@ def getConsoleCommands(self):
149149

150150
arguments.append('-cutline')
151151
arguments.append(ogrMask)
152-
if maskLayer.subsetString() != '':
152+
if maskLayer and maskLayer.subsetString() != '':
153153
arguments.append('-cwhere')
154154
arguments.append(maskLayer.subsetString())
155155

0 commit comments

Comments
 (0)
Please sign in to comment.