From b3e94a06172113991f28a1eff096255c65702a0c Mon Sep 17 00:00:00 2001 From: Zhijux Fan Date: Fri, 7 Dec 2018 12:34:44 +0800 Subject: BaseTools: change the Division Operator PEP 238 -- Changing the Division Operator x/y to return a reasonable approximation of the mathematical result of the division ("true division") x//y to return the floor ("floor division") Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan Tested-by: Laszlo Ersek Tested-by: Ard Biesheuvel Reviewed-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/GenFds/DataSection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/GenFds/DataSection.py') diff --git a/BaseTools/Source/Python/GenFds/DataSection.py b/BaseTools/Source/Python/GenFds/DataSection.py index 28f9b931ca..989e33c43f 100644 --- a/BaseTools/Source/Python/GenFds/DataSection.py +++ b/BaseTools/Source/Python/GenFds/DataSection.py @@ -88,9 +88,9 @@ class DataSection (DataSectionClassObject): if ImageObj.SectionAlignment < 0x400: self.Alignment = str (ImageObj.SectionAlignment) elif ImageObj.SectionAlignment < 0x100000: - self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K' + self.Alignment = str (ImageObj.SectionAlignment // 0x400) + 'K' else: - self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M' + self.Alignment = str (ImageObj.SectionAlignment // 0x100000) + 'M' NoStrip = True if self.SecType in (BINARY_FILE_TYPE_TE, BINARY_FILE_TYPE_PE32): -- cgit v1.2.3