16
16
* *
17
17
***************************************************************************
18
18
"""
19
- from sextante .core .SextanteVectorWriter import SextanteVectorWriter
20
- from sextante .core .QGisLayers import QGisLayers
21
- import sextante
22
19
23
20
__author__ = 'Victor Olaya'
24
21
__date__ = 'August 2012'
27
24
__revision__ = '$Format:%H$'
28
25
29
26
import os
30
- from sextante .core .SextanteUtils import SextanteUtils
27
+ import stat
28
+ import traceback
31
29
import subprocess
30
+ from sextante .core .SextanteUtils import SextanteUtils
32
31
from sextante .core .SextanteConfig import SextanteConfig
33
32
from sextante .core .SextanteLog import SextanteLog
34
- import stat
35
33
from qgis .core import *
36
34
from PyQt4 .QtCore import *
35
+ from sextante .core .SextanteVectorWriter import SextanteVectorWriter
36
+ from sextante .core .QGisLayers import QGisLayers
37
+
37
38
38
39
class SagaUtils :
39
40
@@ -147,12 +148,15 @@ def checkSagaIsInstalled(cls):
147
148
outFeat .setAttributes (attrs )
148
149
writer .addFeature (outFeat )
149
150
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 )
152
154
if not os .path .exists (result ['POLYGONS' ]):
153
155
return "It seems that SAGA is not correctly installed in your system.\n Please install it before running SAGA algorithms."
154
156
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
+
156
160
157
161
settings .setValue ("/SextanteQGIS/SagaInstalled" , True )
158
162
0 commit comments