Skip to content

Commit

Permalink
Fix processing error when grass7 not available
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 7, 2017
1 parent 1aa7ca3 commit 1bc3b28
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/plugins/processing/algs/grass7/Grass7Utils.py
Expand Up @@ -59,6 +59,8 @@ class Grass7Utils(object):

version = None

command = None

@staticmethod
def grassBatchJobFilename():
'''This is used in Linux. This is the batch job that we assign to
Expand Down Expand Up @@ -445,4 +447,10 @@ def grassHelpPath():
helpPath = os.path.abspath(path)
break

return helpPath if helpPath is not None else 'http://grass.osgeo.org/{}/manuals/'.format(Grass7Utils.command)
if helpPath is not None:
return helpPath
elif Grass7Utils.command:
return 'http://grass.osgeo.org/{}/manuals/'.format(Grass7Utils.command)
else:
# grass not available!
return 'http://grass.osgeo.org/72/manuals/'

0 comments on commit 1bc3b28

Please sign in to comment.