Skip to content

Commit 16106b8

Browse files
committedApr 30, 2018
[processing] More verbose error when unsupported SAGA version found
1 parent 27714fc commit 16106b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎python/plugins/processing/algs/saga/SagaAlgorithmProvider.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
pluginPath = os.path.normpath(os.path.join(
4444
os.path.split(os.path.dirname(__file__))[0], os.pardir))
4545

46+
REQUIRED_VERSION = '2.3.'
47+
4648

4749
class SagaAlgorithmProvider(QgsProcessingProvider):
4850

@@ -85,8 +87,8 @@ def loadAlgorithms(self):
8587
self.tr('Processing'), Qgis.Critical)
8688
return
8789

88-
if not version.startswith('2.3.'):
89-
QgsMessageLog.logMessage(self.tr('Problem with SAGA installation: unsupported SAGA version found.'),
90+
if not version.startswith(REQUIRED_VERSION):
91+
QgsMessageLog.logMessage(self.tr('Problem with SAGA installation: unsupported SAGA version (found: {}, required: {}).').format(version, REQUIRED_VERSION),
9092
self.tr('Processing'),
9193
Qgis.Critical)
9294
return

0 commit comments

Comments
 (0)
Please sign in to comment.