From: Gary Lin <glin@suse.com>
To: edk2-devel@lists.01.org
Cc: Yonghong Zhu <yonghong.zhu@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH 12/15] BaseTools: Migrate to the new octal literal
Date: Fri, 19 Jan 2018 12:43:13 +0800 [thread overview]
Message-ID: <20180119044316.4713-13-glin@suse.com> (raw)
In-Reply-To: <20180119044316.4713-1-glin@suse.com>
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>
---
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 2e530f9dd774..47d63faeb995 100644
--- a/BaseTools/Source/Python/Common/LongFilePathOs.py
+++ b/BaseTools/Source/Python/Common/LongFilePathOs.py
@@ -33,7 +33,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 d8736a872366..67e86f4f7454 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:
--
2.15.1
next prev parent reply other threads:[~2018-01-19 4:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 4:43 [PATCH 00/15] BaseTools: One step toward python3 Gary Lin
2018-01-19 4:43 ` [PATCH 01/15] BaseTools: Refactor python except statements Gary Lin
2018-01-19 4:43 ` [PATCH 02/15] BaseTools: Refactor python print statements Gary Lin
2018-01-19 4:43 ` [PATCH 03/15] BaseTools: Remove the old python "not-equal" Gary Lin
2018-01-19 4:43 ` [PATCH 04/15] BaseTools: Use the python3-range functions Gary Lin
2018-01-19 4:43 ` [PATCH 05/15] BaseTools: Remove tuple parameter in python scripts Gary Lin
2018-01-19 4:43 ` [PATCH 06/15] BaseTools: Remove the deprecated hash_key() Gary Lin
2018-01-19 4:43 ` [PATCH 07/15] BaseTools: Import reduce() from functools Gary Lin
2018-01-19 4:43 ` [PATCH 08/15] BaseTools: Replace StandardError with Expression Gary Lin
2018-01-19 4:43 ` [PATCH 09/15] BaseTools: Remove types.TypeType Gary Lin
2018-01-19 4:43 ` [PATCH 10/15] BaseTools: Refactor python raise statement Gary Lin
2018-01-19 4:43 ` [PATCH 11/15] BaseTools: Adjust the spaces around commas and colons Gary Lin
2018-01-19 4:43 ` Gary Lin [this message]
2018-01-19 4:43 ` [PATCH 13/15] BaseTools: Unify long int and int in python scripts Gary Lin
2018-01-19 4:43 ` [PATCH 14/15] BaseTools: Adjust old python2 idioms Gary Lin
2018-01-19 4:43 ` [PATCH 15/15] BaseTools: Replace StringIO.StringIO with io.BytesIO Gary Lin
2018-01-25 13:37 ` [PATCH 00/15] BaseTools: One step toward python3 Zhu, Yonghong
2018-01-26 2:01 ` Gary Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180119044316.4713-13-glin@suse.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox