[GRASS-SVN] r71423 - in grass/trunk/temporal: t.info t.merge t.rast.gapfill t.rast.series t.rast.to.rast3 t.rename t.unregister t.vect.observe.strds
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 20 14:24:20 PDT 2017
Author: annakrat
Date: 2017-08-20 14:24:20 -0700 (Sun, 20 Aug 2017)
New Revision: 71423
Modified:
grass/trunk/temporal/t.info/t.info.py
grass/trunk/temporal/t.merge/t.merge.py
grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py
grass/trunk/temporal/t.rast.series/t.rast.series.py
grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py
grass/trunk/temporal/t.rename/t.rename.py
grass/trunk/temporal/t.unregister/t.unregister.py
grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
Log:
temporal: encode mapset string to avoid injecting unicode into temporal library, see #3392
Modified: grass/trunk/temporal/t.info/t.info.py
===================================================================
--- grass/trunk/temporal/t.info/t.info.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.info/t.info.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -99,7 +99,7 @@
if name.find("@") >= 0:
id_ = name
else:
- id_ = name + "@" + grass.gisenv()["MAPSET"]
+ id_ = name + "@" + grass.encode(grass.gisenv()["MAPSET"])
dataset = tgis.dataset_factory(type_, id_)
Modified: grass/trunk/temporal/t.merge/t.merge.py
===================================================================
--- grass/trunk/temporal/t.merge/t.merge.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.merge/t.merge.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -52,7 +52,7 @@
tgis.init()
#Get the current mapset to create the id of the space time dataset
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
inputs_split = inputs.split(",")
input_ids = []
Modified: grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py
===================================================================
--- grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.rast.gapfill/t.rast.gapfill.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -82,7 +82,7 @@
nprocs = options["nprocs"]
tsuffix = options["suffix"]
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
# Make sure the temporal database exists
tgis.init()
Modified: grass/trunk/temporal/t.rast.series/t.rast.series.py
===================================================================
--- grass/trunk/temporal/t.rast.series/t.rast.series.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.rast.series/t.rast.series.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -120,7 +120,7 @@
if output.find("@") >= 0:
id = output
else:
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
id = output + "@" + mapset
map = sp.get_new_map_instance(id)
Modified: grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py
===================================================================
--- grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.rast.to.rast3/t.rast.to.rast3.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -50,7 +50,7 @@
# Make sure the temporal database exists
tgis.init()
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
sp = tgis.open_old_stds(input, "strds")
Modified: grass/trunk/temporal/t.rename/t.rename.py
===================================================================
--- grass/trunk/temporal/t.rename/t.rename.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.rename/t.rename.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -51,7 +51,7 @@
tgis.init()
#Get the current mapset to create the id of the space time dataset
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
if input.find("@") >= 0:
old_id = input
Modified: grass/trunk/temporal/t.unregister/t.unregister.py
===================================================================
--- grass/trunk/temporal/t.unregister/t.unregister.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.unregister/t.unregister.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -67,7 +67,7 @@
if not maps and not file:
grass.fatal(_("%s= or %s= must be specified") % ("input", "file"))
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
Modified: grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py
===================================================================
--- grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py 2017-08-20 13:35:51 UTC (rev 71422)
+++ grass/trunk/temporal/t.vect.observe.strds/t.vect.observe.strds.py 2017-08-20 21:24:20 UTC (rev 71423)
@@ -98,7 +98,7 @@
dbif = tgis.SQLDatabaseInterfaceConnection()
dbif.connect()
- mapset = grass.gisenv()["MAPSET"]
+ mapset = grass.encode(grass.gisenv()["MAPSET"])
out_sp = tgis.check_new_stds(output, "stvds", dbif, overwrite)
More information about the grass-commit
mailing list