[GRASS-SVN] r34899 - grass/trunk/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 15 05:05:28 EST 2008
Author: martinl
Date: 2008-12-15 05:05:28 -0500 (Mon, 15 Dec 2008)
New Revision: 34899
Modified:
grass/trunk/lib/python/grass.py
Log:
grass.py: skip invalid elements
Modified: grass/trunk/lib/python/grass.py
===================================================================
--- grass/trunk/lib/python/grass.py 2008-12-15 08:28:20 UTC (rev 34898)
+++ grass/trunk/lib/python/grass.py 2008-12-15 10:05:28 UTC (rev 34899)
@@ -304,7 +304,11 @@
mapset = None
for line in read_command("g.mlist", flags="m",
type = type, pattern = pattern).splitlines():
- map, mapset = line.split('@')
+ try:
+ map, mapset = line.split('@')
+ except ValueError:
+ print >> sys.stderr, "Invalid element '%s'" % line
+ continue
if result.has_key(mapset):
result[mapset].append(map)
More information about the grass-commit
mailing list