[processing] Fix default argument is SilentProgress for GeoAlgorithm.execute()

This commit is contained in:
Matthias Kuhn 2016-03-10 10:12:45 +01:00
parent a98fefd2f3
commit 61366583b1
5 changed files with 4 additions and 6 deletions

View File

@ -39,7 +39,7 @@ from processing.tools.system import isMac, isWindows
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"

View File

@ -38,6 +38,7 @@ from qgis.core import QGis, QgsRasterFileWriter
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 @@ class GeoAlgorithm:
# =========================================================
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(),

View File

@ -35,7 +35,6 @@ from processing.gui.Postprocessing import handleAlgorithmResults
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

View File

@ -35,11 +35,11 @@ from qgis.core import QgsMapLayerRegistry
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