Browse Source

put back check for browser, needed on Linux and/or when GRASS_HTML_BROWSER is unset or malformed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56882 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 12 years ago
parent
commit
9d25ce40e8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      scripts/g.manual/g.manual.py

+ 3 - 0
scripts/g.manual/g.manual.py

@@ -46,6 +46,9 @@ import os
 from grass.script import core as grass
 
 def start_browser(entry):
+    if browser != 'xdg-open' and not grass.find_program(browser):
+        grass.fatal(_("Browser '%s' not found") % browser)
+
     path = os.path.join(gisbase, 'docs', 'html', entry + '.html')
     if not os.path.exists(path) and os.getenv('GRASS_ADDON_BASE'):
         path = os.path.join(os.getenv('GRASS_ADDON_BASE'), 'docs', 'html', entry + '.html')