Skip to content
Permalink
Browse files

Merge pull request #2204 from Gustry/processing

[Processing] Small python changes
  • Loading branch information
volaya committed Jul 20, 2015
2 parents dc4049d + e751592 commit 49d0f3a12f02d9638355a9ef676306de5e62d335
@@ -31,7 +31,7 @@
from processing.core.ProcessingConfig import Setting, ProcessingConfig


class AlgorithmProvider:
class AlgorithmProvider(object):
"""This is the base class for algorithms providers.
An algorithm provider is a set of related algorithms, typically
@@ -142,7 +142,7 @@ def help(self):
return False, helpUrl


def processAlgorithm(self):
def processAlgorithm(self, progress):
"""Here goes the algorithm itself.
There is no return value from this method.
@@ -229,10 +229,10 @@ def execute(self, progress=None, model=None):
progress.setPercentage(100)
self.convertUnsupportedFormats(progress)
self.runPostExecutionScript(progress)
except GeoAlgorithmExecutionException, gaee:
except GeoAlgorithmExecutionException as gaee:
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, gaee.msg)
raise gaee
except Exception, e:
except Exception as e:
# If something goes wrong and is not caught in the
# algorithm, we catch it here and wrap it
lines = [self.tr('Uncaught error while executing algorithm')]
@@ -50,7 +50,7 @@ def runalg(alg, progress=None):
try:
alg.execute(progress)
return True
except GeoAlgorithmExecutionException, e:
except GeoAlgorithmExecutionException as e:
ProcessingLog.addToLog(sys.exc_info()[0], ProcessingLog.LOG_ERROR)
progress.error(e.msg)
return False
@@ -26,7 +26,7 @@
__revision__ = '$Format:%H$'


class SilentProgress:
class SilentProgress(object):

def error(self, msg):
print msg

0 comments on commit 49d0f3a

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