Skip to content

Commit

Permalink
processing: avoid fetching the layer parameters when not executing
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 1, 2019
1 parent 5a54eb7 commit 19933e0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/plugins/processing/algs/gdal/GdalUtils.py
Expand Up @@ -406,14 +406,14 @@ def parseCreationOptions(value):
def writeLayerParameterToTextFile(filename, alg, parameters, parameter_name, context, quote=True, executing=False):
listFile = QgsProcessingUtils.generateTempFilename(filename)

layers = []
for l in alg.parameterAsLayerList(parameters, parameter_name, context):
if quote:
layers.append('"' + l.source() + '"')
else:
layers.append(l.source())

if executing:
layers = []
for l in alg.parameterAsLayerList(parameters, parameter_name, context):
if quote:
layers.append('"' + l.source() + '"')
else:
layers.append(l.source())

with open(listFile, 'w') as f:
f.write('\n'.join(layers))

Expand Down

0 comments on commit 19933e0

Please sign in to comment.