Add support for Python3 in setup files
Future versions of macOS won't include Python2 and it is recommended that we run Python3 from the terminal as Python2 is no longer supported. - map() returns an iterator instead of a list in Python3. Using list comprehension instead. - New octal notation Bug: 1068191, 942720 Change-Id: Idec9a22b81bf95fe8e026cd2157f662aab9afb47 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2231064 Commit-Queue: Roberto Moura <mouraroberto@google.com> Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#776445} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: d63e2795c9504823faa085516573a17580f5e6f8
This commit is contained in:
Родитель
976fe9513a
Коммит
399c6f13e0
|
@ -31,7 +31,7 @@ def PrepareFrameworkVersion(version_file, framework_root_dir, version):
|
|||
# directory exists.
|
||||
dirname = os.path.dirname(version_file)
|
||||
if not os.path.isdir(dirname):
|
||||
os.makedirs(dirname, 0700)
|
||||
os.makedirs(dirname, 0o700)
|
||||
|
||||
with open(version_file, 'w+') as f:
|
||||
f.write(version)
|
||||
|
|
|
@ -39,7 +39,7 @@ class SdkError(Exception):
|
|||
|
||||
def parse_version(version_str):
|
||||
"""'10.6' => [10, 6]"""
|
||||
return map(int, re.findall(r'(\d+)', version_str))
|
||||
return [int(s) for s in re.findall(r'(\d+)', version_str)]
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Загрузка…
Ссылка в новой задаче