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>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Lin, Derek 2018-05-09 17:03:24 +08:00 committed by Yonghong Zhu
parent c731b54505
commit c61db18e5d
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
# process GUIDed section generation # process GUIDed section generation
# #
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # 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 # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -273,7 +274,7 @@ class GuidSection(GuidSectionClassObject) :
self.Alignment = None self.Alignment = None
self.IncludeFvSection = False self.IncludeFvSection = False
self.ProcessRequired = "TRUE" 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' self.Alignment = '1'
return OutputFileList, self.Alignment return OutputFileList, self.Alignment