diff --git a/drivers/python/age/builder.py b/drivers/python/age/builder.py index a13de4717..b65992403 100644 --- a/drivers/python/age/builder.py +++ b/drivers/python/age/builder.py @@ -22,6 +22,8 @@ from antlr4.tree.Tree import * from decimal import Decimal +resultHandler = None + class ResultHandler: def parse(ageData): pass @@ -34,7 +36,10 @@ def parseAgeValue(value, cursor=None): if value is None: return None - resultHandler = Antlr4ResultHandler(None) + global resultHandler + if (resultHandler == None): + resultHandler = Antlr4ResultHandler(None) + try: return resultHandler.parse(value) except Exception as ex: