diff --git a/python/plugins/processing/core/AlgorithmProvider.py b/python/plugins/processing/core/AlgorithmProvider.py index 4997cdc63a1..6a51fbd4a18 100644 --- a/python/plugins/processing/core/AlgorithmProvider.py +++ b/python/plugins/processing/core/AlgorithmProvider.py @@ -31,7 +31,7 @@ from qgis.core import QgsVectorFileWriter 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 diff --git a/python/plugins/processing/core/GeoAlgorithm.py b/python/plugins/processing/core/GeoAlgorithm.py index ead63bbab44..3f3d57082c7 100644 --- a/python/plugins/processing/core/GeoAlgorithm.py +++ b/python/plugins/processing/core/GeoAlgorithm.py @@ -142,7 +142,7 @@ class GeoAlgorithm: 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 @@ class GeoAlgorithm: 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')] diff --git a/python/plugins/processing/gui/AlgorithmExecutor.py b/python/plugins/processing/gui/AlgorithmExecutor.py index acd38b4b6f0..19e417ec24e 100644 --- a/python/plugins/processing/gui/AlgorithmExecutor.py +++ b/python/plugins/processing/gui/AlgorithmExecutor.py @@ -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 diff --git a/python/plugins/processing/gui/SilentProgress.py b/python/plugins/processing/gui/SilentProgress.py index 5b89a812032..cff916fd240 100644 --- a/python/plugins/processing/gui/SilentProgress.py +++ b/python/plugins/processing/gui/SilentProgress.py @@ -26,7 +26,7 @@ __copyright__ = '(C) 2013, Victor Olaya' __revision__ = '$Format:%H$' -class SilentProgress: +class SilentProgress(object): def error(self, msg): print msg