Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] Fix default argument is SilentProgress for GeoAlgorithm.…
…execute()
  • Loading branch information
m-kuhn committed Mar 10, 2016
1 parent a98fefd commit 6136658
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/otb/OTBUtils.py
Expand Up @@ -39,7 +39,7 @@
import logging
import xml.etree.ElementTree as ET
import traceback
from processing.gui.SilentProgress import SilentProgress
from processing.core.SilentProgress import SilentProgress


OTB_FOLDER = "OTB_FOLDER"
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/processing/core/GeoAlgorithm.py
Expand Up @@ -38,6 +38,7 @@
from processing.core.ProcessingLog import ProcessingLog
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
from processing.core.SilentProgress import SilentProgress
from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
from processing.core.outputs import OutputVector, OutputRaster, OutputTable, OutputHTML, Output
from processing.algs.gdal.GdalUtils import GdalUtils
Expand Down Expand Up @@ -183,7 +184,7 @@ def checkParameterValuesBeforeExecuting(self):

# =========================================================

def execute(self, progress=None, model=None):
def execute(self, progress=SilentProgress(), model=None):
"""The method to use to call a processing algorithm.
Although the body of the algorithm is in processAlgorithm(),
Expand Down
3 changes: 0 additions & 3 deletions python/plugins/processing/gui/AlgorithmExecutor.py
Expand Up @@ -35,7 +35,6 @@
from processing.tools import dataobjects
from processing.tools.system import getTempFilename
from processing.tools import vector
from processing.gui.SilentProgress import SilentProgress


def runalg(alg, progress=None):
Expand All @@ -45,8 +44,6 @@ def runalg(alg, progress=None):
Return true if everything went OK, false if the algorithm
could not be completed.
"""
if progress is None:
progress = SilentProgress()
try:
alg.execute(progress)
return True
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/Postprocessing.py
Expand Up @@ -35,11 +35,11 @@
from processing.core.ProcessingConfig import ProcessingConfig
from processing.core.ProcessingResults import ProcessingResults
from processing.core.ProcessingLog import ProcessingLog
from processing.core.SilentProgress import SilentProgress

from processing.gui.ResultsDialog import ResultsDialog
from processing.gui.RenderingStyles import RenderingStyles
from processing.gui.MessageDialog import MessageDialog
from processing.gui.SilentProgress import SilentProgress

from processing.core.outputs import OutputRaster
from processing.core.outputs import OutputVector
Expand Down

0 comments on commit 6136658

Please sign in to comment.