diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2015-12-18 06:43:57 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-18 06:43:57 +0000 |
commit | 253a4b8ccbb4a984189eb29c48c25f6ef266ca80 (patch) | |
tree | a2207b2a3a2e6f9a42a5d9262cf616dfa369b727 /BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | |
parent | 818e60d95106bd68679bf4be1cef67f0d0af4b6c (diff) | |
download | edk2-platforms-253a4b8ccbb4a984189eb29c48c25f6ef266ca80.tar.xz |
BaseTools: Clean some coding style issues
This patch clean some coding style issues, majorly for space character.
(Sync patch r19080 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19369 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py index 5bdc1b8288..8a974236f2 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -274,7 +274,7 @@ class GenFdsGlobalVariable: # @param ArchList The Arch list of platform
#
def SetDir (OutputDir, FdfParser, WorkSpace, ArchList):
- GenFdsGlobalVariable.VerboseLogger( "GenFdsGlobalVariable.OutputDir :%s" %OutputDir)
+ GenFdsGlobalVariable.VerboseLogger("GenFdsGlobalVariable.OutputDir :%s" % OutputDir)
# GenFdsGlobalVariable.OutputDirDict = OutputDir
GenFdsGlobalVariable.FdfParser = FdfParser
GenFdsGlobalVariable.WorkSpace = WorkSpace
@@ -292,7 +292,7 @@ class GenFdsGlobalVariable: # Create FV Address inf file
#
GenFdsGlobalVariable.FvAddressFileName = os.path.join(GenFdsGlobalVariable.FfsDir, 'FvAddress.inf')
- FvAddressFile = open (GenFdsGlobalVariable.FvAddressFileName, 'w')
+ FvAddressFile = open(GenFdsGlobalVariable.FvAddressFileName, 'w')
#
# Add [Options]
#
@@ -304,7 +304,7 @@ class GenFdsGlobalVariable: break
FvAddressFile.writelines("EFI_BOOT_DRIVER_BASE_ADDRESS = " + \
- BsAddress + \
+ BsAddress + \
T_CHAR_LF)
RtAddress = '0'
@@ -313,7 +313,7 @@ class GenFdsGlobalVariable: RtAddress = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag].RtBaseAddress
FvAddressFile.writelines("EFI_RUNTIME_DRIVER_BASE_ADDRESS = " + \
- RtAddress + \
+ RtAddress + \
T_CHAR_LF)
FvAddressFile.close()
@@ -386,13 +386,13 @@ class GenFdsGlobalVariable: CommandFile = Output + '.txt'
if Ui not in [None, '']:
#Cmd += ["-n", '"' + Ui + '"']
- SectionData = array.array('B', [0,0,0,0])
+ SectionData = array.array('B', [0, 0, 0, 0])
SectionData.fromstring(Ui.encode("utf_16_le"))
SectionData.append(0)
SectionData.append(0)
Len = len(SectionData)
GenFdsGlobalVariable.SectionHeader.pack_into(SectionData, 0, Len & 0xff, (Len >> 8) & 0xff, (Len >> 16) & 0xff, 0x15)
- SaveFileOnChange(Output, SectionData.tostring())
+ SaveFileOnChange(Output, SectionData.tostring())
elif Ver not in [None, '']:
Cmd += ["-n", Ver]
if BuildNumber:
@@ -461,12 +461,12 @@ class GenFdsGlobalVariable: Cmd = ["GenFv"]
if BaseAddress not in [None, '']:
Cmd += ["-r", BaseAddress]
-
+
if ForceRebase == False:
- Cmd +=["-F", "FALSE"]
+ Cmd += ["-F", "FALSE"]
elif ForceRebase == True:
- Cmd +=["-F", "TRUE"]
-
+ Cmd += ["-F", "TRUE"]
+
if Capsule:
Cmd += ["-c"]
if Dump:
@@ -570,7 +570,7 @@ class GenFdsGlobalVariable: if VendorId != None:
Cmd += ["-f", VendorId]
- Cmd += ["-o", Output]
+ Cmd += ["-o", Output]
GenFdsGlobalVariable.CallExternalTool(Cmd, "Failed to generate option rom")
@staticmethod
@@ -606,7 +606,7 @@ class GenFdsGlobalVariable: sys.stdout.write('\n')
try:
- PopenObject = subprocess.Popen(' '.join(cmd), stdout=subprocess.PIPE, stderr= subprocess.PIPE, shell=True)
+ PopenObject = subprocess.Popen(' '.join(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
except Exception, X:
EdkLogger.error("GenFds", COMMAND_FAILURE, ExtraData="%s: %s" % (str(X), cmd[0]))
(out, error) = PopenObject.communicate()
@@ -618,7 +618,7 @@ class GenFdsGlobalVariable: returnValue[0] = PopenObject.returncode
return
if PopenObject.returncode != 0 or GenFdsGlobalVariable.VerboseMode or GenFdsGlobalVariable.DebugLevel != -1:
- GenFdsGlobalVariable.InfLogger ("Return Value = %d" %PopenObject.returncode)
+ GenFdsGlobalVariable.InfLogger ("Return Value = %d" % PopenObject.returncode)
GenFdsGlobalVariable.InfLogger (out)
GenFdsGlobalVariable.InfLogger (error)
if PopenObject.returncode != 0:
@@ -631,7 +631,7 @@ class GenFdsGlobalVariable: def InfLogger (msg):
EdkLogger.info(msg)
- def ErrorLogger (msg, File = None, Line = None, ExtraData = None):
+ def ErrorLogger (msg, File=None, Line=None, ExtraData=None):
EdkLogger.error('GenFds', GENFDS_ERROR, msg, File, Line, ExtraData)
def DebugLogger (Level, msg):
@@ -642,7 +642,7 @@ class GenFdsGlobalVariable: # @param Str String that may contain macro
# @param MacroDict Dictionary that contains macro value pair
#
- def MacroExtend (Str, MacroDict = {}, Arch = 'COMMON'):
+ def MacroExtend (Str, MacroDict={}, Arch='COMMON'):
if Str == None :
return None
@@ -699,10 +699,10 @@ class GenFdsGlobalVariable: PcdValue = PcdObj.DefaultValue
return PcdValue
-
- for Package in GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform,
- Arch,
- GenFdsGlobalVariable.TargetName,
+
+ for Package in GenFdsGlobalVariable.WorkSpace.GetPackageList(GenFdsGlobalVariable.ActivePlatform,
+ Arch,
+ GenFdsGlobalVariable.TargetName,
GenFdsGlobalVariable.ToolChainTag):
PcdDict = Package.Pcds
for Key in PcdDict:
|