[GRASS-SVN] r34900 - grass/branches/develbranch_6/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 15 05:08:40 EST 2008
Author: martinl
Date: 2008-12-15 05:08:40 -0500 (Mon, 15 Dec 2008)
New Revision: 34900
Modified:
grass/branches/develbranch_6/lib/python/grass.py
Log:
grass.py: skip invalid elements
(merge from trunk, r34899)
Modified: grass/branches/develbranch_6/lib/python/grass.py
===================================================================
--- grass/branches/develbranch_6/lib/python/grass.py 2008-12-15 10:05:28 UTC (rev 34899)
+++ grass/branches/develbranch_6/lib/python/grass.py 2008-12-15 10:08:40 UTC (rev 34900)
@@ -322,7 +322,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