Skip to content

Commit

Permalink
[processing] use SilentProgress by default if no progress object is p…
Browse files Browse the repository at this point in the history
…assed
  • Loading branch information
volaya committed Nov 27, 2016
1 parent 3e73840 commit 739e2aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/gui/AlgorithmExecutor.py
Expand Up @@ -17,6 +17,7 @@
***************************************************************************
"""


__author__ = 'Victor Olaya'
__date__ = 'August 2012'
__copyright__ = '(C) 2012, Victor Olaya'
Expand All @@ -35,7 +36,7 @@
from processing.tools import dataobjects
from processing.tools.system import getTempFilename
from processing.tools import vector

from processing.core.SilentProgress import SilentProgress

def runalg(alg, progress=None):
"""Executes a given algorithm, showing its progress in the
Expand All @@ -45,7 +46,7 @@ def runalg(alg, progress=None):
could not be completed.
"""
try:
alg.execute(progress)
alg.execute(progress or SilentProgress())
return True
except GeoAlgorithmExecutionException as e:
ProcessingLog.addToLog(sys.exc_info()[0], ProcessingLog.LOG_ERROR)
Expand Down

0 comments on commit 739e2aa

Please sign in to comment.