From: Gary Lin Date: Fri, 13 Jul 2018 10:18:39 +0000 (+0800) Subject: BaseTools: Use absolute import in BPDG X-Git-Tag: edk2-stable201903~1407 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=72a836c00a3bd57420a324bd9cf086298849e21b BaseTools: Use absolute import in BPDG Based on "futurize -f libfuturize.fixes.fix_absolute_import Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Jaben Carsey --- diff --git a/BaseTools/Source/Python/BPDG/BPDG.py b/BaseTools/Source/Python/BPDG/BPDG.py index 07cee89762..2ec1516c0a 100644 --- a/BaseTools/Source/Python/BPDG/BPDG.py +++ b/BaseTools/Source/Python/BPDG/BPDG.py @@ -21,6 +21,7 @@ # Import Modules # from __future__ import print_function +from __future__ import absolute_import import Common.LongFilePathOs as os import sys import encodings.ascii @@ -30,8 +31,8 @@ from Common import EdkLogger from Common.BuildToolError import * from Common.BuildVersion import gBUILD_VERSION -import StringTable as st -import GenVpd +from . import StringTable as st +from . import GenVpd PROJECT_NAME = st.LBL_BPDG_LONG_UNI VERSION = (st.LBL_BPDG_VERSION + " Build " + gBUILD_VERSION) diff --git a/BaseTools/Source/Python/BPDG/GenVpd.py b/BaseTools/Source/Python/BPDG/GenVpd.py index 2eefcc2490..cd272a2d9a 100644 --- a/BaseTools/Source/Python/BPDG/GenVpd.py +++ b/BaseTools/Source/Python/BPDG/GenVpd.py @@ -13,9 +13,10 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # +from __future__ import absolute_import import Common.LongFilePathOs as os from io import BytesIO -import StringTable as st +from . import StringTable as st import array import re from Common.LongFilePathSupport import OpenLongFilePath as open