diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2018-10-24 01:29:19 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-25 20:14:49 +0800 |
commit | 9e47e6f90880e090cd81f585abd7a6c553fbce10 (patch) | |
tree | c280e390d282db4c41d64718b366c1c3e64dc9ba /BaseTools/Source/Python/GenFds/FvImageSection.py | |
parent | 0019375fbc89e4d7cfebe29e288b74731bd9f456 (diff) | |
download | edk2-9e47e6f90880e090cd81f585abd7a6c553fbce10.tar.gz edk2-9e47e6f90880e090cd81f585abd7a6c553fbce10.tar.bz2 edk2-9e47e6f90880e090cd81f585abd7a6c553fbce10.zip |
BaseTools/GenFds: cleanup GenFds
1) remove wildcard imports and use explicit imports
2) refactor to use shared variables from Common/DataType
3) rename to not shadow imports
4) don't assign a variable in a loop (just do final assignment)
5) remove spaces, parens, unused or commented out code, etc.
6) merge unnecessary parent classes into child
7) refactor to share DXE and PEI apriori GUIDs from one place
this includes changes to Build and EOT files
8) for PEP8, dont use __ for custom methods.
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Bob C Feng <bob.c.feng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FvImageSection.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FvImageSection.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/GenFds/FvImageSection.py b/BaseTools/Source/Python/GenFds/FvImageSection.py index 04556fc870..d6e1f3315b 100644 --- a/BaseTools/Source/Python/GenFds/FvImageSection.py +++ b/BaseTools/Source/Python/GenFds/FvImageSection.py @@ -18,7 +18,7 @@ from __future__ import absolute_import
from . import Section
from io import BytesIO
-from .Ffs import Ffs
+from .Ffs import SectionSuffix
import subprocess
from .GenFdsGlobalVariable import GenFdsGlobalVariable
import Common.LongFilePathOs as os
@@ -76,7 +76,7 @@ class FvImageSection(FvImageSectionClassObject): if FvAlignmentValue > MaxFvAlignment:
MaxFvAlignment = FvAlignmentValue
- OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + Num + Ffs.SectionSuffix.get("FV_IMAGE"))
+ OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + Num + SectionSuffix.get("FV_IMAGE"))
GenFdsGlobalVariable.GenerateSection(OutputFile, [FvFileName], 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE', IsMakefile=IsMakefile)
OutputFileList.append(OutputFile)
@@ -146,7 +146,7 @@ class FvImageSection(FvImageSectionClassObject): #
# Prepare the parameter of GenSection
#
- OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + SecNum + Ffs.SectionSuffix.get("FV_IMAGE"))
+ OutputFile = os.path.join(OutputPath, ModuleName + SUP_MODULE_SEC + SecNum + SectionSuffix.get("FV_IMAGE"))
GenFdsGlobalVariable.GenerateSection(OutputFile, [FvFileName], 'EFI_SECTION_FIRMWARE_VOLUME_IMAGE', IsMakefile=IsMakefile)
OutputFileList.append(OutputFile)
|