[GRASS-SVN] r72505 - grass/trunk/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 22 13:08:38 PDT 2018
Author: huhabla
Date: 2018-03-22 13:08:38 -0700 (Thu, 22 Mar 2018)
New Revision: 72505
Modified:
grass/trunk/lib/python/temporal/datetime_math.py
grass/trunk/lib/python/temporal/temporal_algebra.py
grass/trunk/lib/python/temporal/temporal_raster3d_algebra.py
grass/trunk/lib/python/temporal/temporal_raster_algebra.py
grass/trunk/lib/python/temporal/temporal_vector_algebra.py
Log:
temporal algebra: Do not create the parsertab file when running the algebra
Modified: grass/trunk/lib/python/temporal/datetime_math.py
===================================================================
--- grass/trunk/lib/python/temporal/datetime_math.py 2018-03-22 18:15:32 UTC (rev 72504)
+++ grass/trunk/lib/python/temporal/datetime_math.py 2018-03-22 20:08:38 UTC (rev 72505)
@@ -869,6 +869,9 @@
month_names = ["", "jan", "feb", "mar", "apr", "may", "jun",
"jul", "aug", "sep", "oct", "nov", "dec"]
+ if dt is None:
+ raise Exception("Empty datetime object in datetime_to_grass_datetime_string")
+
# Check for time zone info in the datetime object
if dt.tzinfo is not None:
Modified: grass/trunk/lib/python/temporal/temporal_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_algebra.py 2018-03-22 18:15:32 UTC (rev 72504)
+++ grass/trunk/lib/python/temporal/temporal_algebra.py 2018-03-22 20:08:38 UTC (rev 72505)
@@ -893,7 +893,7 @@
"""
self.lexer = TemporalAlgebraLexer()
self.lexer.build()
- self.parser = yacc.yacc(module=self, debug=self.debug)
+ self.parser = yacc.yacc(module=self, debug=self.debug, write_tables=False)
self.overwrite = overwrite
self.count = 0
Modified: grass/trunk/lib/python/temporal/temporal_raster3d_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_raster3d_algebra.py 2018-03-22 18:15:32 UTC (rev 72504)
+++ grass/trunk/lib/python/temporal/temporal_raster3d_algebra.py 2018-03-22 20:08:38 UTC (rev 72505)
@@ -56,7 +56,7 @@
self.lexer = TemporalRasterAlgebraLexer()
self.lexer.build()
- self.parser = yacc.yacc(module=self, debug=self.debug)
+ self.parser = yacc.yacc(module=self, debug=self.debug, write_tables=False)
self.overwrite = overwrite
self.count = 0
Modified: grass/trunk/lib/python/temporal/temporal_raster_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_raster_algebra.py 2018-03-22 18:15:32 UTC (rev 72504)
+++ grass/trunk/lib/python/temporal/temporal_raster_algebra.py 2018-03-22 20:08:38 UTC (rev 72505)
@@ -100,7 +100,7 @@
self.lexer = TemporalRasterAlgebraLexer()
self.lexer.build()
- self.parser = yacc.yacc(module=self, debug=self.debug)
+ self.parser = yacc.yacc(module=self, debug=self.debug, write_tables=False)
self.overwrite = overwrite
self.count = 0
Modified: grass/trunk/lib/python/temporal/temporal_vector_algebra.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_vector_algebra.py 2018-03-22 18:15:32 UTC (rev 72504)
+++ grass/trunk/lib/python/temporal/temporal_vector_algebra.py 2018-03-22 20:08:38 UTC (rev 72505)
@@ -149,7 +149,7 @@
self.lexer = TemporalVectorAlgebraLexer()
self.lexer.build()
- self.parser = yacc.yacc(module=self, debug=self.debug)
+ self.parser = yacc.yacc(module=self, debug=self.debug, write_tables=False)
self.overwrite = overwrite
self.count = 0
More information about the grass-commit
mailing list