From 1b2e077260030290c512f3ac71a044ed1150899f Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Tue, 4 Sep 2018 10:39:47 +0800 Subject: BaseTools/UPT: Porting UPT Tool from Python2 to Python3 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/UPT/Parser/DecParserMisc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/UPT/Parser/DecParserMisc.py') diff --git a/BaseTools/Source/Python/UPT/Parser/DecParserMisc.py b/BaseTools/Source/Python/UPT/Parser/DecParserMisc.py index c5c35ede78..cd4d87224d 100644 --- a/BaseTools/Source/Python/UPT/Parser/DecParserMisc.py +++ b/BaseTools/Source/Python/UPT/Parser/DecParserMisc.py @@ -151,7 +151,7 @@ def IsValidNumValUint8(Token): else: Base = 10 try: - TokenValue = long(Token, Base) + TokenValue = int(Token, Base) except BaseException: Valid, Cause = IsValidLogicalExpr(Token, True) if Cause: @@ -262,7 +262,7 @@ def IsValidPcdDatum(Type, Value): Value = Value.lstrip('0') if not Value: return True, "" - Value = long(Value, 0) + Value = int(Value, 0) TypeLenMap = { # # 0x00 - 0xff -- cgit v1.2.3