From 2e300969aeff5a863098242ebd95b7d653893262 Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Tue, 14 Aug 2018 15:57:47 +0800 Subject: BaseTools: change the Division Operator in the expression 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: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- 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 182ea4f3da..3302c14091 100644 --- a/BaseTools/Source/Python/GenFds/DataSection.py +++ b/BaseTools/Source/Python/GenFds/DataSection.py @@ -87,9 +87,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