[GRASS-SVN] r74490 - grass/trunk/scripts/g.search.modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu May 16 06:56:05 PDT 2019
Author: annakrat
Date: 2019-05-16 06:56:04 -0700 (Thu, 16 May 2019)
New Revision: 74490
Modified:
grass/trunk/scripts/g.search.modules/g.search.modules.py
Log:
g.search.modules: handle cases when man page is missing
Modified: grass/trunk/scripts/g.search.modules/g.search.modules.py
===================================================================
--- grass/trunk/scripts/g.search.modules/g.search.modules.py 2019-05-16 13:45:07 UTC (rev 74489)
+++ grass/trunk/scripts/g.search.modules/g.search.modules.py 2019-05-16 13:56:04 UTC (rev 74490)
@@ -68,6 +68,7 @@
from grass.script.utils import diff_files, try_rmdir
from grass.script import core as grass
+from grass.exceptions import CalledModuleError
try:
import xml.etree.ElementTree as etree
@@ -303,9 +304,12 @@
def _manpage_search(pattern, name):
+ try:
+ manpage = grass.read_command('g.manual', flags='m', entry=name)
+ except CalledModuleError:
+ # in case man page is missing
+ return False
- manpage = grass.read_command('g.manual', flags='m', entry=name)
-
return manpage.lower().find(pattern) > -1
if __name__ == "__main__":
More information about the grass-commit
mailing list