diff options
Diffstat (limited to 'BaseTools/Source/Python/Common/Expression.py')
-rw-r--r-- | BaseTools/Source/Python/Common/Expression.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index a4853b78a4..80fad7563d 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -256,9 +256,12 @@ class ValueExpression(object): if self.__IsNumberToken():
return self._Expr
- Token = self._GetToken()
- if type(Token) == type('') and Token.startswith('{') and Token.endswith('}') and self._Idx >= self._Len:
- return self._Expr
+ try:
+ Token = self._GetToken()
+ if type(Token) == type('') and Token.startswith('{') and Token.endswith('}') and self._Idx >= self._Len:
+ return self._Expr
+ except BadExpression:
+ pass
self._Idx = 0
self._Token = ''
|