mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] Fix default argument is SilentProgress for GeoAlgorithm.execute()
This commit is contained in:
parent
a98fefd2f3
commit
61366583b1
@ -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"
|
||||
|
@ -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(),
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user