]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/GuidSection.py
BaseTools: Replace StandardError with Expression
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / GuidSection.py
index 08665a3d4d491a25b95d012fbe234d8d07cc57d0..bda185476b95035bfeb129511331f5ac8734333a 100644 (file)
@@ -2,6 +2,7 @@
 # process GUIDed section generation\r
 #\r
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -28,6 +29,7 @@ from Common.BuildToolError import *
 from FvImageSection import FvImageSection\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
 from GenFds import FindExtendTool\r
+from Common.DataType import *\r
 \r
 ## generate GUIDed section\r
 #\r
@@ -121,7 +123,7 @@ class GuidSection(GuidSectionClassObject) :
         OutputFile = OutputPath + \\r
                      os.sep + \\r
                      ModuleName + \\r
-                     'SEC' + \\r
+                     SUP_MODULE_SEC + \\r
                      SecNum + \\r
                      Ffs.SectionSuffix['GUIDED']\r
         OutputFile = os.path.normpath(OutputFile)\r
@@ -156,7 +158,7 @@ class GuidSection(GuidSectionClassObject) :
             TempFile = OutputPath + \\r
                        os.sep + \\r
                        ModuleName + \\r
-                       'SEC' + \\r
+                       SUP_MODULE_SEC + \\r
                        SecNum + \\r
                        '.tmp'\r
             TempFile = os.path.normpath(TempFile)\r
@@ -272,7 +274,7 @@ class GuidSection(GuidSectionClassObject) :
                 self.Alignment = None\r
                 self.IncludeFvSection = False\r
                 self.ProcessRequired = "TRUE"\r
-            if IsMakefile and self.Alignment.strip() == '0':\r
+            if IsMakefile and self.Alignment is not None and self.Alignment.strip() == '0':\r
                 self.Alignment = '1'\r
             return OutputFileList, self.Alignment\r
 \r