Skip to content
Permalink
Browse files

[processing] Fix default argument is SilentProgress for GeoAlgorithm.…

…execute()
  • Loading branch information
m-kuhn committed Mar 10, 2016
1 parent a98fefd commit 61366583b147aa729fa89a17db76640a8df29c9f
@@ -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"
@@ -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
@@ -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(),
@@ -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):
@@ -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
@@ -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

0 comments on commit 6136658

Please sign in to comment.
You can’t perform that action at this time.