From 8945ecdbbf37c8e0c280c915345c94139229a15c Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Fri, 10 Jan 2025 02:59:31 -0500 Subject: [PATCH] update --- .flake8 | 1 - python/grass/temporal/temporal_algebra.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index 9a8ded72afb..1076c8cf68f 100644 --- a/.flake8 +++ b/.flake8 @@ -45,7 +45,6 @@ per-file-ignores = python/grass/pygrass/vector/__init__.py: E402 python/grass/temporal/datetime_math.py: E722 python/grass/temporal/spatial_topology_dataset_connector.py: E722 - python/grass/temporal/temporal_algebra.py: E722 python/grass/temporal/temporal_granularity.py: E722 # Current benchmarks/tests are changing sys.path before import. # Possibly, a different approach should be taken there anyway. diff --git a/python/grass/temporal/temporal_algebra.py b/python/grass/temporal/temporal_algebra.py index 6c110205d3c..c0be497672f 100644 --- a/python/grass/temporal/temporal_algebra.py +++ b/python/grass/temporal/temporal_algebra.py @@ -445,7 +445,7 @@ try: from ply import lex, yacc -except: +except ImportError: pass import copy @@ -2857,7 +2857,7 @@ def p_t_var_expr_td_hash(self, t) -> None: map_i.condition_value.append(boolname) else: map_i.condition_value = boolname - except: + except (IndexError, AttributeError): self.msgr.fatal( "Error: the given expression does not contain a correct time " "difference object."