[GRASS-SVN] r51887 - in grass/trunk/temporal: t.register t.unregister
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 30 06:24:12 PDT 2012
Author: huhabla
Date: 2012-05-30 06:24:09 -0700 (Wed, 30 May 2012)
New Revision: 51887
Modified:
grass/trunk/temporal/t.register/test.t.register.raster.sh
grass/trunk/temporal/t.register/test.t.register.vector.sh
grass/trunk/temporal/t.unregister/t.unregister.py
Log:
Write a warning in case the map to unregister is not found.
Modified: grass/trunk/temporal/t.register/test.t.register.raster.sh
===================================================================
--- grass/trunk/temporal/t.register/test.t.register.raster.sh 2012-05-30 10:37:15 UTC (rev 51886)
+++ grass/trunk/temporal/t.register/test.t.register.raster.sh 2012-05-30 13:24:09 UTC (rev 51887)
@@ -92,6 +92,8 @@
t.topology input=precip_abs7
t.unregister type=rast maps=prec_1,prec_2,prec_3
+# Test the warning message
+t.unregister type=rast maps=prec_1,prec_2,prec_3
t.remove type=strds input=precip_abs1,precip_abs2,precip_abs3,precip_abs4,precip_abs5,precip_abs6,precip_abs7
t.unregister type=rast maps=prec_4,prec_5,prec_6
r.info map=prec_1
Modified: grass/trunk/temporal/t.register/test.t.register.vector.sh
===================================================================
--- grass/trunk/temporal/t.register/test.t.register.vector.sh 2012-05-30 10:37:15 UTC (rev 51886)
+++ grass/trunk/temporal/t.register/test.t.register.vector.sh 2012-05-30 13:24:09 UTC (rev 51887)
@@ -59,6 +59,8 @@
t.info type=stvds input=lidar_abs_ds7
t.unregister --v type=vect maps=lidar_abs_1,lidar_abs_2,lidar_abs_3
+# Test warning
+t.unregister --v type=vect maps=lidar_abs_1,lidar_abs_2,lidar_abs_3
t.remove --v type=stvds input=lidar_abs_ds1,lidar_abs_ds2,lidar_abs_ds3,lidar_abs_ds4,lidar_abs_ds5,lidar_abs_ds6,lidar_abs_ds7
t.unregister --v type=vect maps=lidar_abs_4,lidar_abs_5,lidar_abs_6
g.remove vect=lidar_abs_1,lidar_abs_2,lidar_abs_3,lidar_abs_4,lidar_abs_5,lidar_abs_6
Modified: grass/trunk/temporal/t.unregister/t.unregister.py
===================================================================
--- grass/trunk/temporal/t.unregister/t.unregister.py 2012-05-30 10:37:15 UTC (rev 51886)
+++ grass/trunk/temporal/t.unregister/t.unregister.py 2012-05-30 13:24:09 UTC (rev 51887)
@@ -148,6 +148,8 @@
update_dict[dataset["id"]] = dataset["id"]
# Collect SQL statements
statement += map.delete(dbif=dbif, update=False, execute=False)
+ else:
+ grass.warning(_("Unable to find %s map <%s> in temporal database"%(map.get_type(), map.get_id())))
count += 1
More information about the grass-commit
mailing list