]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenFds: Fix 'NoneType' object is not iterable error.
authorQiu Shumin <shumin.qiu@intel.com>
Wed, 12 Aug 2015 01:27:31 +0000 (01:27 +0000)
committershenshushi <shenshushi@Edk2>
Wed, 12 Aug 2015 01:27:31 +0000 (01:27 +0000)
When adding section VERSION in FDF file, for example:
FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
    SECTION RAW = MdeModulePkg/Logo/Logo.bmp
    SECTION UI = "Logo"
    SECTION VERSION = "0001"
  }
GenFds will report the following error:
Traceback (most recent call last):
  File "GenFds.py", line 276, in main
  File "GenFds.py", line 391, in GenFd
  File "Fd.py", line 93, in GenFd
  File "Region.py", line 106, in AddToBuffer
  File "Fv.py", line 114, in AddToBuffer
  File "FfsFileStatement.py", line 117, in GenFfs
  File "VerSection.py", line 80, in GenSection
  File "GenFdsGlobalVariable.py", line 401, in GenerateSection
TypeError: 'NoneType' object is not iterable.
We found in GenFdsGlobalVariable.py line 401 'list' requires a iteralbe object as parameter while the 'Input' is None.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18205 6f19259b-4bc3-4df7-8a09-765794883524

BaseTools/Source/Python/GenFds/VerSection.py

index 657ebd9d166e328bcf0d642f999441f038c1cf02..7399e7a5d4c7cc7eb749fb92b8e5f7481f7bdc2d 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # process Version section generation\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<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
@@ -76,7 +76,7 @@ class VerSection (VerSectionClassObject):
         else:\r
             StringData = ''\r
 \r
-        GenFdsGlobalVariable.GenerateSection(OutputFile, None, 'EFI_SECTION_VERSION',\r
+        GenFdsGlobalVariable.GenerateSection(OutputFile, [], 'EFI_SECTION_VERSION',\r
                                              Ver=StringData, BuildNumber=self.BuildNum)\r
         OutputFileList = []\r
         OutputFileList.append(OutputFile)\r