[GRASS-SVN] r56882 - grass/trunk/scripts/g.manual

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 22 16:14:46 PDT 2013


Author: hamish
Date: 2013-06-22 16:14:46 -0700 (Sat, 22 Jun 2013)
New Revision: 56882

Modified:
   grass/trunk/scripts/g.manual/g.manual.py
Log:
put back check for browser, needed on Linux and/or when GRASS_HTML_BROWSER is unset or malformed

Modified: grass/trunk/scripts/g.manual/g.manual.py
===================================================================
--- grass/trunk/scripts/g.manual/g.manual.py	2013-06-22 23:10:24 UTC (rev 56881)
+++ grass/trunk/scripts/g.manual/g.manual.py	2013-06-22 23:14:46 UTC (rev 56882)
@@ -46,6 +46,9 @@
 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')



More information about the grass-commit mailing list