blueprint/formulas: in the batch ingester, catch a more precise exception type
1 files changed, 5 insertions(+), 2 deletions(-)

M tshistory_refinery/blueprint.py
M tshistory_refinery/blueprint.py +5 -2
@@ 24,7 24,10 @@ from psyl.lisp import (
 
 from sqlhelp import select
 from tshistory_formula import registry
-from tshistory_formula.helper import BadKeyword, validate
+from tshistory_formula.helper import (
+    BadKeyword,
+    validate
+)
 from tsview.util import format_formula as pretty_formula
 from tsview.blueprint import homeurl
 

          
@@ 174,7 177,7 @@ def refinery_bp(tsa, more_sections=None)
                 parsed = fparse(row.text)
                 try:
                     validate(parsed)
-                except Exception as error:
+                except BadKeyword as error:
                     syntax_error.add(row.name + ' : ' + repr(error))
                     continue