Skip to content
Browse files
runalg accepts algorithm parameter.
git-svn-id: 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information committed Jul 10, 2012
1 parent f969579 commit 0b8e10728de91e7bb2d2ad7d3a690b351332c9cb
Showing 1 changed file with 6 additions and 2 deletions.
@@ -5,6 +5,7 @@
from sextante.core.QGisLayers import QGisLayers
from sextante.gui.AlgorithmExecutor import AlgorithmExecutor
from sextante.core.SextanteConfig import SextanteConfig
from sextante.core.GeoAlgorithm import GeoAlgorithm
from sextante.core.SextanteLog import SextanteLog
from sextante.modeler.ModelerAlgorithmProvider import ModelerAlgorithmProvider
from sextante.ftools.FToolsAlgorithmProvider import FToolsAlgorithmProvider
@@ -246,8 +247,11 @@ def alghelp(name):

def runalg(name, *args):
alg = Sextante.getAlgorithm(name)
def runalg(algOrName, *args):
if isinstance(algOrName, GeoAlgorithm):
alg = algOrName
alg = Sextante.getAlgorithm(algOrName)
if alg == None:
print("Error: Algorithm not found\n")

0 comments on commit 0b8e107

Please sign in to comment.