diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-10-10 11:00:31 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-13 09:50:42 +0800 |
commit | 8371d87412bc1dae454dcc570691fc0d63e710b4 (patch) | |
tree | fa1c0a276bfedde65ef3f28d129af4c00d9e2e98 /BaseTools/Source/Python/Common | |
parent | 261eee25de664dcef2d99b6365b16c9bc444143f (diff) | |
download | edk2-8371d87412bc1dae454dcc570691fc0d63e710b4.tar.gz edk2-8371d87412bc1dae454dcc570691fc0d63e710b4.tar.bz2 edk2-8371d87412bc1dae454dcc570691fc0d63e710b4.zip |
BaseTools: Rename long() to int()
Because the long() function was not exist in Python3.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r-- | BaseTools/Source/Python/Common/Misc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 502f607f8d..40c0105a3c 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -1591,7 +1591,7 @@ def CheckPcdDatum(Type, Value): if Value and int(Value, 0) < 0:
return False, "PCD can't be set to negative value[%s] for datum type [%s]" % (Value, Type)
try:
- Value = long(Value, 0)
+ Value = int(Value, 0)
if Value > MAX_VAL_TYPE[Type]:
return False, "Too large PCD value[%s] for datum type [%s]" % (Value, Type)
except:
@@ -2081,7 +2081,7 @@ def PackRegistryFormatGuid(Guid): # @retval Value The integer value that the input represents
#
def GetIntegerValue(Input):
- if type(Input) in (int, long):
+ if isinstance(Input, int):
return Input
String = Input
if String.endswith("U"):
|