[GRASS-SVN] r33724 - grass/branches/develbranch_6/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 7 07:30:25 EDT 2008
Author: martinl
Date: 2008-10-07 07:30:25 -0400 (Tue, 07 Oct 2008)
New Revision: 33724
Modified:
grass/branches/develbranch_6/lib/python/grass.py
Log:
grass.py: catch AttributeError in find_file()
Modified: grass/branches/develbranch_6/lib/python/grass.py
===================================================================
--- grass/branches/develbranch_6/lib/python/grass.py 2008-10-07 11:30:03 UTC (rev 33723)
+++ grass/branches/develbranch_6/lib/python/grass.py 2008-10-07 11:30:25 UTC (rev 33724)
@@ -157,7 +157,10 @@
def find_file(name, element = 'cell'):
lines = read_command("g.findfile", element = element, file = name).splitlines()
- return dict([_kv_regex.match(line).groups() for line in lines])
+ try:
+ return dict([_kv_regex.match(line).groups() for line in lines])
+ except AttributeError:
+ return None
# interface to g.list
More information about the grass-commit
mailing list