From 2617a73c3628473bacea887d885bdd1e7808ccc6 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Mon, 25 Jun 2018 18:31:34 +0800 Subject: [PATCH] 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 --- BaseTools/Source/Python/Common/LongFilePathOs.py | 2 +- BaseTools/Source/Python/UPT/Core/FileHook.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: