From 656d2539be34ea0ce356857ffd4f9decdf0476b2 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Wed, 11 Apr 2018 09:14:05 -0700 Subject: BaseTools: replace 'UINT8','UINT16','UINT32','UINT64','VOID*' with shared constants. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/GenFds/FdfParser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py') diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index a106253527..6baf875833 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1134,7 +1134,7 @@ class FdfParser: @staticmethod def __Verify(Name, Value, Scope): - if Scope in ['UINT64', 'UINT8']: + if Scope in [TAB_UINT64, TAB_UINT8]: ValueNumber = 0 try: ValueNumber = int (Value, 0) @@ -1142,10 +1142,10 @@ class FdfParser: EdkLogger.error("FdfParser", FORMAT_INVALID, "The value is not valid dec or hex number for %s." % Name) if ValueNumber < 0: EdkLogger.error("FdfParser", FORMAT_INVALID, "The value can't be set to negative value for %s." % Name) - if Scope == 'UINT64': + if Scope == TAB_UINT64: if ValueNumber >= 0x10000000000000000: EdkLogger.error("FdfParser", FORMAT_INVALID, "Too large value for %s." % Name) - if Scope == 'UINT8': + if Scope == TAB_UINT8: if ValueNumber >= 0x100: EdkLogger.error("FdfParser", FORMAT_INVALID, "Too large value for %s." % Name) return True -- cgit v1.2.3