From: Gary Lin Date: Mon, 25 Jun 2018 10:31:34 +0000 (+0800) Subject: BaseTools: Migrate to the new octal literal X-Git-Tag: edk2-stable201903~1516 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=2617a73c3628473bacea887d885bdd1e7808ccc6 BaseTools: Migrate to the new octal literal Change the octal literals according to PEP3127 https://www.python.org/dev/peps/pep-3127/ Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Yonghong Zhu --- diff --git a/BaseTools/Source/Python/Common/LongFilePathOs.py b/BaseTools/Source/Python/Common/LongFilePathOs.py index 2cebbb276b..4939a8bc73 100644 --- a/BaseTools/Source/Python/Common/LongFilePathOs.py +++ b/BaseTools/Source/Python/Common/LongFilePathOs.py @@ -41,7 +41,7 @@ def rmdir(path): def mkdir(path): return os.mkdir(LongFilePath(path)) -def makedirs(name, mode=0777): +def makedirs(name, mode=0o777): return os.makedirs(LongFilePath(name), mode) def rename(old, new): diff --git a/BaseTools/Source/Python/UPT/Core/FileHook.py b/BaseTools/Source/Python/UPT/Core/FileHook.py index d8736a8723..67e86f4f74 100644 --- a/BaseTools/Source/Python/UPT/Core/FileHook.py +++ b/BaseTools/Source/Python/UPT/Core/FileHook.py @@ -166,7 +166,7 @@ def _hookrm(path): else: __built_in_remove__(path) -def _hookmkdir(path, mode=0777): +def _hookmkdir(path, mode=0o777): if GlobalData.gRECOVERMGR: GlobalData.gRECOVERMGR.bkmkdir(path, mode) else: