summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Flick <dougflick@microsoft.com>2025-04-14 09:55:49 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-04-14 20:53:02 +0000
commit0f1c0d2d2d9e567746ce4fedea23f833fa0d3abd (patch)
tree8a86def09b3636872203d1b594b70ca643eecdc9
parent1805068b5ef41572569da02f2347317d5665ddee (diff)
downloadedk2-pg/proximity_domain_rework.tar.gz
edk2-pg/proximity_domain_rework.tar.bz2
edk2-pg/proximity_domain_rework.zip
BaseTools:Expression.py Adding a check for missing '}' in the parserpg/proximity_domain_rework
This check is to catch cases where a missing '}' exists in a dec or dsc file. Signed-off-by: Doug Flick <dougflick@microsoft.com>
-rw-r--r--BaseTools/Source/Python/Common/Expression.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 138b38c927..f8b34aaa58 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -917,7 +917,7 @@ class ValueExpressionEx(ValueExpression):
TmpList.append('0x%02x' % ((TmpValue >> I * 8) & 0xff))
PcdValue = '{' + ', '.join(TmpList) + '}'
except:
- if PcdValue.strip().startswith('{'):
+ if PcdValue.strip().startswith('{') and PcdValue.strip().endswith('}'):
PcdValueList = SplitPcdValueString(PcdValue.strip()[1:-1])
LabelDict = {}
NewPcdValueList = []