From c6de6619629526d55b9eee04e391d9845dea48d3 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 31 May 2023 09:53:05 +0800 Subject: [PATCH] bugfix --- appPublic/argsConvert.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appPublic/argsConvert.py b/appPublic/argsConvert.py index 640486f..3d929bd 100755 --- a/appPublic/argsConvert.py +++ b/appPublic/argsConvert.py @@ -50,7 +50,12 @@ class ArgsConvert(object): try: v = eval(var,namespace) except Exception as e: - v = namespace.get(var,default) + v = namespace.get(var, None) + if v: + return v + if callable(default): + return default(var) + return default return v def convertUnicode(self,s,namespace,default):