]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix python error with --genfds-multi-thread.
authorLin, Derek <derek.lin2@hpe.com>
Wed, 9 May 2018 09:03:24 +0000 (17:03 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Fri, 11 May 2018 01:02:31 +0000 (09:02 +0800)
When self.Alignment is None, it ran into python error since there is no
strip() in None.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/GenFds/GuidSection.py

index 1105689e0d79968c7de0303aec49ef986c7dc124..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
@@ -273,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