Skip to content
Permalink
Browse files

More modeler algorithm debug info.

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@338 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
cpolymeris@gmail.com
cpolymeris@gmail.com committed Aug 7, 2012
1 parent 0b22244 commit 4bb5e36e445a79a626cb2d44567c568c791f52e8
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/sextante/modeler/ModelerAlgorithm.py
@@ -17,6 +17,7 @@
from sextante.parameters.ParameterTableField import ParameterTableField
from sextante.gui.Help2Html import Help2Html
import codecs
import time

class ModelerAlgorithm(GeoAlgorithm):

@@ -375,12 +376,18 @@ def processAlgorithm(self, progress):
progress.setText("Running " + alg.name + " [" + str(iAlg+1) + "/"
+ str(len(self.algs) - len(self.deactivated)) +"]")
outputs = {}
progress.setDebugInfo("Parameters: " +
', '.join([str(p).strip() + "=" + str(p.value) for p in alg.parameters]))
t0 = time.time()
alg.execute(progress)
dt = time.time() - t0
for out in alg.outputs:
outputs[out.name] = out.value
progress.setDebugInfo("Outputs: " +
', '.join([str(out).strip() + "=" + str(outputs[out.name]) for out in alg.outputs]))
self.producedOutputs[iAlg] = outputs
executed.append(iAlg)
progress.setDebugInfo("OK. %i outputs" % len(outputs))
progress.setDebugInfo("OK. Execution took %0.3f ms (%i outputs)." % (dt, len(outputs)))
except GeoAlgorithmExecutionException, e :
progress.setDebugInfo("Failed")
raise GeoAlgorithmExecutionException("Error executing algorithm " + str(iAlg) + "\n" + e.msg)

0 comments on commit 4bb5e36

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