1616* *
1717***************************************************************************
1818"""
19- from sextante .core .SextanteVectorWriter import SextanteVectorWriter
20- from sextante .core .QGisLayers import QGisLayers
21- import sextante
2219
2320__author__ = 'Victor Olaya'
2421__date__ = 'August 2012'
2724__revision__ = '$Format:%H$'
2825
2926import os
30- from sextante .core .SextanteUtils import SextanteUtils
27+ import stat
28+ import traceback
3129import subprocess
30+ from sextante .core .SextanteUtils import SextanteUtils
3231from sextante .core .SextanteConfig import SextanteConfig
3332from sextante .core .SextanteLog import SextanteLog
34- import stat
3533from qgis .core import *
3634from PyQt4 .QtCore import *
35+ from sextante .core .SextanteVectorWriter import SextanteVectorWriter
36+ from sextante .core .QGisLayers import QGisLayers
37+
3738
3839class SagaUtils :
3940
@@ -147,12 +148,15 @@ def checkSagaIsInstalled(cls):
147148 outFeat .setAttributes (attrs )
148149 writer .addFeature (outFeat )
149150 del writer .writer
150- del writer
151- result = sextante .runalg ("saga:thiessenpolygons" , filename , None )
151+ del writer
152+ from sextante .core .Sextante import runalg
153+ result = runalg ("saga:thiessenpolygons" , filename , None )
152154 if not os .path .exists (result ['POLYGONS' ]):
153155 return "It seems that SAGA is not correctly installed in your system.\n Please install it before running SAGA algorithms."
154156 except :
155- return "It seems that SAGA is not correctly installed in your system.\n Please install it before running SAGA algorithms."
157+ s = traceback .format_exc ()
158+ return "Error while checking SAGA installation. SAGA might not be correctly configured.\n " + s ;
159+
156160
157161 settings .setValue ("/SextanteQGIS/SagaInstalled" , True )
158162
0 commit comments