Skip to content

Commit 6136658

Browse files
committed
[processing] Fix default argument is SilentProgress for GeoAlgorithm.execute()
1 parent a98fefd commit 6136658

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

python/plugins/processing/algs/otb/OTBUtils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import logging
4040
import xml.etree.ElementTree as ET
4141
import traceback
42-
from processing.gui.SilentProgress import SilentProgress
42+
from processing.core.SilentProgress import SilentProgress
4343

4444

4545
OTB_FOLDER = "OTB_FOLDER"

python/plugins/processing/core/GeoAlgorithm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from processing.core.ProcessingLog import ProcessingLog
3939
from processing.core.ProcessingConfig import ProcessingConfig
4040
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
41+
from processing.core.SilentProgress import SilentProgress
4142
from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
4243
from processing.core.outputs import OutputVector, OutputRaster, OutputTable, OutputHTML, Output
4344
from processing.algs.gdal.GdalUtils import GdalUtils
@@ -183,7 +184,7 @@ def checkParameterValuesBeforeExecuting(self):
183184

184185
# =========================================================
185186

186-
def execute(self, progress=None, model=None):
187+
def execute(self, progress=SilentProgress(), model=None):
187188
"""The method to use to call a processing algorithm.
188189
189190
Although the body of the algorithm is in processAlgorithm(),

python/plugins/processing/gui/AlgorithmExecutor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from processing.tools import dataobjects
3636
from processing.tools.system import getTempFilename
3737
from processing.tools import vector
38-
from processing.gui.SilentProgress import SilentProgress
3938

4039

4140
def runalg(alg, progress=None):
@@ -45,8 +44,6 @@ def runalg(alg, progress=None):
4544
Return true if everything went OK, false if the algorithm
4645
could not be completed.
4746
"""
48-
if progress is None:
49-
progress = SilentProgress()
5047
try:
5148
alg.execute(progress)
5249
return True

python/plugins/processing/gui/Postprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
from processing.core.ProcessingConfig import ProcessingConfig
3636
from processing.core.ProcessingResults import ProcessingResults
3737
from processing.core.ProcessingLog import ProcessingLog
38+
from processing.core.SilentProgress import SilentProgress
3839

3940
from processing.gui.ResultsDialog import ResultsDialog
4041
from processing.gui.RenderingStyles import RenderingStyles
4142
from processing.gui.MessageDialog import MessageDialog
42-
from processing.gui.SilentProgress import SilentProgress
4343

4444
from processing.core.outputs import OutputRaster
4545
from processing.core.outputs import OutputVector

0 commit comments

Comments
 (0)