Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(315)

Unified Diff: build/mac_toolchain.py

Issue 1971663002: Fix build/mac_toolchain.py for pylint warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/mac_toolchain.py
diff --git a/build/mac_toolchain.py b/build/mac_toolchain.py
index 4de6e05c6509f5aa3c36f932522e005fbaace2ca..28cbd84d29918f0df80ef21141ccf79888bd5c05 100755
--- a/build/mac_toolchain.py
+++ b/build/mac_toolchain.py
@@ -109,7 +109,7 @@ def LoadPlist(path):
os.unlink(name)
-def AcceptLicense(directory):
+def AcceptLicense():
"""Use xcodebuild to accept new toolchain license if necessary. Don't accept
the license if a newer license has already been accepted. This only works if
xcodebuild and xcode-select are passwordless in sudoers."""
@@ -135,7 +135,7 @@ def AcceptLicense(directory):
# Don't accept the license of older toolchain builds, this will break the
# license of newer builds.
return
- except (subprocess.CalledProcessError, KeyError) as e:
+ except (subprocess.CalledProcessError, KeyError):
# If there's never been a license of type |build_type| accepted,
# |target_license_plist_path| or |agreed_to_key| may not exist.
pass
@@ -176,7 +176,7 @@ def main():
TOOLCHAIN_VERSION)
if ReadStampFile() == toolchain_revision:
print 'Toolchain (%s) is already up to date.' % toolchain_revision
- AcceptLicense(TOOLCHAIN_BUILD_DIR)
+ AcceptLicense()
return 0
if not CanAccessToolchainBucket():
@@ -194,13 +194,14 @@ def main():
toolchain_file = 'toolchain-%s.tgz' % toolchain_revision
toolchain_full_url = TOOLCHAIN_URL + toolchain_file
DownloadAndUnpack(toolchain_full_url, TOOLCHAIN_BUILD_DIR)
- AcceptLicense(TOOLCHAIN_BUILD_DIR)
+ AcceptLicense()
print 'Toolchain %s unpacked.' % toolchain_revision
WriteStampFile(toolchain_revision)
return 0
- except:
+ except Exception as e:
print 'Failed to download toolchain %s.' % toolchain_file
+ print 'Exception %s' % e
print 'Exiting.'
return 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698