[edk2] [PATCH] BaseTools: Fix python error with --genfds-multi-thread.

Lin, Derek (HPS UEFI Dev) posted 1 patch 5 years, 11 months ago
Failed in applying to current master (apply log)
BaseTools/Source/Python/GenFds/GuidSection.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[edk2] [PATCH] BaseTools: Fix python error with --genfds-multi-thread.
Posted by Lin, Derek (HPS UEFI Dev) 5 years, 11 months ago
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>
---
 BaseTools/Source/Python/GenFds/GuidSection.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py
index 1105689e0d..6cadff0bd2 100644
--- a/BaseTools/Source/Python/GenFds/GuidSection.py
+++ b/BaseTools/Source/Python/GenFds/GuidSection.py
@@ -2,7 +2,7 @@
 # process GUIDed section generation
 #
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> -#
+#  Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
 #  This program and the accompanying materials  #  are licensed and made available under the terms and conditions of the BSD License  #  which accompanies this distribution.  The full text of the license may be found at @@ -273,7 +273,7 @@ class GuidSection(GuidSectionClassObject) :
                 self.Alignment = None
                 self.IncludeFvSection = False
                 self.ProcessRequired = "TRUE"
-            if IsMakefile and self.Alignment.strip() == '0':
+            if IsMakefile and self.Alignment is not None and self.Alignment.strip() == '0':
                 self.Alignment = '1'
             return OutputFileList, self.Alignment
 
--
2.15.1.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] BaseTools: Fix python error with --genfds-multi-thread.
Posted by Zhu, Yonghong 5 years, 11 months ago
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Lin, Derek (HPS UEFI Dev) [mailto:derek.lin2@hpe.com] 
Sent: Wednesday, May 09, 2018 5:03 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Lin, Derek (HPS UEFI Dev) <derek.lin2@hpe.com>
Subject: [PATCH] BaseTools: Fix python error with --genfds-multi-thread.

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>
---
 BaseTools/Source/Python/GenFds/GuidSection.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py
index 1105689e0d..6cadff0bd2 100644
--- a/BaseTools/Source/Python/GenFds/GuidSection.py
+++ b/BaseTools/Source/Python/GenFds/GuidSection.py
@@ -2,7 +2,7 @@
 # process GUIDed section generation
 #
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> -#
+#  Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
 #  This program and the accompanying materials  #  are licensed and made available under the terms and conditions of the BSD License  #  which accompanies this distribution.  The full text of the license may be found at @@ -273,7 +273,7 @@ class GuidSection(GuidSectionClassObject) :
                 self.Alignment = None
                 self.IncludeFvSection = False
                 self.ProcessRequired = "TRUE"
-            if IsMakefile and self.Alignment.strip() == '0':
+            if IsMakefile and self.Alignment is not None and self.Alignment.strip() == '0':
                 self.Alignment = '1'
             return OutputFileList, self.Alignment
 
--
2.15.1.windows.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel