Skip to content

Commit 1bc3b28

Browse files
committedApr 7, 2017
Fix processing error when grass7 not available
1 parent 1aa7ca3 commit 1bc3b28

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎python/plugins/processing/algs/grass7/Grass7Utils.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class Grass7Utils(object):
5959

6060
version = None
6161

62+
command = None
63+
6264
@staticmethod
6365
def grassBatchJobFilename():
6466
'''This is used in Linux. This is the batch job that we assign to
@@ -445,4 +447,10 @@ def grassHelpPath():
445447
helpPath = os.path.abspath(path)
446448
break
447449

448-
return helpPath if helpPath is not None else 'http://grass.osgeo.org/{}/manuals/'.format(Grass7Utils.command)
450+
if helpPath is not None:
451+
return helpPath
452+
elif Grass7Utils.command:
453+
return 'http://grass.osgeo.org/{}/manuals/'.format(Grass7Utils.command)
454+
else:
455+
# grass not available!
456+
return 'http://grass.osgeo.org/72/manuals/'

0 commit comments

Comments
 (0)
Please sign in to comment.