mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
small python change
This commit is contained in:
parent
a9e9f86f37
commit
e751592a4d
@ -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
|
||||
|
@ -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')]
|
||||
|
@ -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 @@ __copyright__ = '(C) 2013, Victor Olaya'
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
|
||||
class SilentProgress:
|
||||
class SilentProgress(object):
|
||||
|
||||
def error(self, msg):
|
||||
print msg
|
||||
|
Loading…
x
Reference in New Issue
Block a user