[GRASS-SVN] r62924 - grass/trunk/scripts/r.tileset
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 25 02:46:52 PST 2014
Author: lucadelu
Date: 2014-11-25 02:46:52 -0800 (Tue, 25 Nov 2014)
New Revision: 62924
Modified:
grass/trunk/scripts/r.tileset/r.tileset.py
Log:
r.tileset: catch m.proj error if the proj string is wrong
Modified: grass/trunk/scripts/r.tileset/r.tileset.py
===================================================================
--- grass/trunk/scripts/r.tileset/r.tileset.py 2014-11-25 10:30:11 UTC (rev 62923)
+++ grass/trunk/scripts/r.tileset/r.tileset.py 2014-11-25 10:46:52 UTC (rev 62924)
@@ -113,6 +113,7 @@
from grass.script.utils import separator
from grass.script import core as grass
+from grass.exceptions import CalledModuleError
def bboxToPoints(bbox):
@@ -156,13 +157,16 @@
"""Projects point (x, y) using projector"""
errors = 0
points = []
- ret = grass.read_command('m.proj',
- quiet=True,
- flags='d',
- proj_in=source['proj'],
- proj_out=dest['proj'],
- sep=';',
- input=file)
+ try:
+ ret = grass.read_command('m.proj',
+ quiet=True,
+ flags='d',
+ proj_in=source['proj'],
+ proj_out=dest['proj'],
+ sep=';',
+ input=file)
+ except CalledModuleError:
+ grass.fatal(cs2cs + ' failed')
if not ret:
grass.fatal(cs2cs + ' failed')
More information about the grass-commit
mailing list