summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/Expression.py
diff options
context:
space:
mode:
authorDoug Flick <dougflick@microsoft.com>2025-04-11 16:06:09 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2025-04-14 20:53:02 +0000
commit1805068b5ef41572569da02f2347317d5665ddee (patch)
tree035ddc756f8d1fbce1134cc920d984fc37585ee6 /BaseTools/Source/Python/Common/Expression.py
parenta1b623b938b8aa2a019c11f7c07eca7504a03749 (diff)
downloadedk2-1805068b5ef41572569da02f2347317d5665ddee.tar.gz
edk2-1805068b5ef41572569da02f2347317d5665ddee.tar.bz2
edk2-1805068b5ef41572569da02f2347317d5665ddee.zip
BaseTools:Expression.py Add Assertion for PCD with value {}
This adds an assertion to the PCD class in the Expression.py file to check for zero-byte PCDs. Signed-off-by: Doug Flick <dougflick@microsoft.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/Expression.py')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 4860ace11a..138b38c927 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -1027,6 +1027,8 @@ class ValueExpressionEx(ValueExpression):
if Size > 0:
PcdValue = '{' + ', '.join(AllPcdValueList) + '}'
+ else:
+ raise BadExpression("PCD with value '%s' cannot be used. Please provide a valid value of at least one byte." % (self.PcdValue))
else:
raise BadExpression("Type: %s, Value: %s, %s"%(self.PcdType, PcdValue, Value))