Skip to content


runalg accepts algorithm parameter.
Browse files Browse the repository at this point in the history
git-svn-id: 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information committed Jul 10, 2012
1 parent f969579 commit 0b8e107
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/sextante/core/
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 0b8e107

Please sign in to comment.