[edk2] [PATCH 07/15] BaseTools: Import reduce() from functools

Gary Lin posted 15 patches 6 years, 11 months ago
There is a newer version of this series
[edk2] [PATCH 07/15] BaseTools: Import reduce() from functools
Posted by Gary Lin 6 years, 11 months ago
In python3, reduce() is not a built-in function anymore.
Import it from "functools" to be compatible with python 3.

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
---
 BaseTools/Source/Python/AutoGen/GenPcdDb.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
index 875ee5895fd9..891ec5fd95c7 100644
--- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py
+++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py
@@ -21,6 +21,7 @@ from ValidCheckingInfoObject import VAR_VALID_OBJECT_FACTORY
 from Common.VariableAttributes import VariableAttributes
 import copy
 from struct import unpack
+from functools import reduce
 
 DATABASE_VERSION = 7
 
-- 
2.15.1

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