From eae1a97178582efb12eacff0151acbf184758fed Mon Sep 17 00:00:00 2001 From: Victor Olaya Date: Sat, 6 Apr 2013 19:47:31 +0200 Subject: [PATCH] [sextante] fixed #7525 (problem with checking if external app is installed) --- python/plugins/sextante/grass/GrassUtils.py | 13 +++++++------ python/plugins/sextante/saga/SagaUtils.py | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/python/plugins/sextante/grass/GrassUtils.py b/python/plugins/sextante/grass/GrassUtils.py index e9b7631d10d0..2817f4c14e7d 100644 --- a/python/plugins/sextante/grass/GrassUtils.py +++ b/python/plugins/sextante/grass/GrassUtils.py @@ -16,8 +16,6 @@ * * *************************************************************************** """ -from sextante.tests.TestData import points -import traceback __author__ = 'Victor Olaya' __date__ = 'August 2012' @@ -26,9 +24,12 @@ __revision__ = '$Format:%H$' import os -from sextante.core.SextanteUtils import SextanteUtils, mkdir +from PyQt4.QtCore import * +import traceback import subprocess +from sextante.tests.TestData import points from sextante.core.SextanteConfig import SextanteConfig +from sextante.core.SextanteUtils import SextanteUtils, mkdir from sextante.core.SextanteLog import SextanteLog import stat import shutil @@ -336,10 +337,10 @@ def checkGrassIsInstalled(ignoreRegistrySettings=False): return ("The specified GRASS folder does not contain a valid set of GRASS modules.\n" + "Please, go to the SEXTANTE settings dialog, and check that the GRASS\n" + "folder is correctly configured") - + + settings = QSettings() if not ignoreRegistrySettings: - GRASS_INSTALLED = "/SextanteQGIS/GrassInstalled" - settings = QSettings() + GRASS_INSTALLED = "/SextanteQGIS/GrassInstalled" if settings.contains(GRASS_INSTALLED): return diff --git a/python/plugins/sextante/saga/SagaUtils.py b/python/plugins/sextante/saga/SagaUtils.py index 96392ef07086..05ba59be9f9a 100644 --- a/python/plugins/sextante/saga/SagaUtils.py +++ b/python/plugins/sextante/saga/SagaUtils.py @@ -127,9 +127,9 @@ def checkSagaIsInstalled(ignoreRegistrySettings=False): + "Please, go to the SEXTANTE settings dialog, and check that the SAGA\n" + "folder is correctly configured") + settings = QSettings() if not ignoreRegistrySettings: - SAGA_INSTALLED = "/SextanteQGIS/SagaInstalled" - settings = QSettings() + SAGA_INSTALLED = "/SextanteQGIS/SagaInstalled" if settings.contains(SAGA_INSTALLED): return