BaseTools: Migrate to the new octal literal
authorGary Lin <glin@suse.com>
Mon, 25 Jun 2018 10:31:34 +0000 (18:31 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 27 Jun 2018 08:33:27 +0000 (16:33 +0800)
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 <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/LongFilePathOs.py
BaseTools/Source/Python/UPT/Core/FileHook.py

index 2cebbb276b19f7838d90b09b8dabbadb07eb9fd2..4939a8bc733c5f6718650e0f7927ab11ef47b914 100644 (file)
@@ -41,7 +41,7 @@ def rmdir(path):
 def mkdir(path):\r
     return os.mkdir(LongFilePath(path))\r
 \r
-def makedirs(name, mode=0777):\r
+def makedirs(name, mode=0o777):\r
     return os.makedirs(LongFilePath(name), mode)\r
 \r
 def rename(old, new):\r
index d8736a872366e83f8bd7456f3a28cc536f828624..67e86f4f74547424970f8f0b8f5b25b1a79b4fee 100644 (file)
@@ -166,7 +166,7 @@ def _hookrm(path):
     else:\r
         __built_in_remove__(path)\r
 \r
-def _hookmkdir(path, mode=0777):\r
+def _hookmkdir(path, mode=0o777):\r
     if GlobalData.gRECOVERMGR:\r
         GlobalData.gRECOVERMGR.bkmkdir(path, mode)\r
     else:\r