[GRASS-SVN] r58654 - grass/trunk/lib/python/temporal

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 9 13:27:15 PST 2014


Author: huhabla
Date: 2014-01-09 13:27:15 -0800 (Thu, 09 Jan 2014)
New Revision: 58654

Modified:
   grass/trunk/lib/python/temporal/core.py
Log:
Environmental variable handling improvement


Modified: grass/trunk/lib/python/temporal/core.py
===================================================================
--- grass/trunk/lib/python/temporal/core.py	2014-01-09 21:18:47 UTC (rev 58653)
+++ grass/trunk/lib/python/temporal/core.py	2014-01-09 21:27:15 UTC (rev 58654)
@@ -65,7 +65,7 @@
 def profile_function(func):
     do_profiling = os.getenv("GRASS_TGIS_PROFILE")
     
-    if do_profiling is not None:
+    if do_profiling is "True" or do_profiling is "1":
         import cProfile, pstats, StringIO
         pr = cProfile.Profile()
         pr.enable()
@@ -108,7 +108,7 @@
 # this value must be an integer larger than 0
 # Increase this value in case of backward incompatible changes
 # temporal database SQL layout
-tgis_db_version=2
+tgis_db_version=3
 
 # We need to know the parameter style of the database backend
 tgis_dbmi_paramstyle = None
@@ -427,8 +427,8 @@
        - temporal GIS database (set by t.connect database=)
 
        The following environmental variables are checked:
-        - GRASS_TGIS_PROFILE
-        - GRASS_TGIS_RAISE_ON_ERROR
+        - GRASS_TGIS_PROFILE (True, False, 1, 0)
+        - GRASS_TGIS_RAISE_ON_ERROR (True, False, 1, 0)
 
         ATTENTION: This functions must be called before any spatio-temporal processing
                    can be started
@@ -459,7 +459,7 @@
     current_gisdbase = grassenv["GISDBASE"]
 
     # Check environment variable GRASS_TGIS_RAISE_ON_ERROR
-    if os.getenv("GRASS_TGIS_RAISE_ON_ERROR") is not None:
+    if os.getenv("GRASS_TGIS_RAISE_ON_ERROR") is "True" or os.getenv("GRASS_TGIS_RAISE_ON_ERROR") is "1":
         raise_on_error = True
 
     # Check if the script library raises on error, 



More information about the grass-commit mailing list