Skip to content

Commit 9de737a

Browse files
author
volayaf
committed
fixed problem when opening OTB descriptions
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@231 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent 15dfeff commit 9de737a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/sextante/otb/OTBAlgorithmProvider.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ def createAlgsList(self):
2929
self.preloadedAlgs = []
3030
folder = OTBUtils.otbDescriptionPath()
3131
for descriptionFile in os.listdir(folder):
32-
try:
33-
alg = OTBAlgorithm(os.path.join(folder, descriptionFile))
34-
if alg.name.strip() != "":
35-
self.preloadedAlgs.append(alg)
36-
else:
32+
if descriptionFile.endswith("rsx"):
33+
try:
34+
alg = OTBAlgorithm(os.path.join(folder, descriptionFile))
35+
if alg.name.strip() != "":
36+
self.preloadedAlgs.append(alg)
37+
else:
38+
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open OTB algorithm: " + descriptionFile)
39+
except Exception,e:
3740
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open OTB algorithm: " + descriptionFile)
38-
except Exception,e:
39-
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open OTB algorithm: " + descriptionFile)
4041

4142

4243
def initializeSettings(self):

0 commit comments

Comments
 (0)