summaryrefslogtreecommitdiffstats
path: root/build/get_syzygy_binaries.py
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-28 21:49:29 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-28 21:49:29 +0000
commitd2a9f242789b77a85284ada06d379d543e2ddb50 (patch)
tree9d1a1179205d65d5b1f4e9f49df0a89c58c2ef90 /build/get_syzygy_binaries.py
parent174827feec16284ab7f4d30208711cf4a85d41bb (diff)
downloadchromium_src-d2a9f242789b77a85284ada06d379d543e2ddb50.zip
chromium_src-d2a9f242789b77a85284ada06d379d543e2ddb50.tar.gz
chromium_src-d2a9f242789b77a85284ada06d379d543e2ddb50.tar.bz2
Revert 273353 "Bring Syzygy binaries in using a script rather th..."
broke webview_licenses.py: Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning third_party/syzygy > Bring Syzygy binaries in using a script rather than as a dependency. > > BUG= > > Review URL: https://codereview.chromium.org/306543006 TBR=chrisha@chromium.org Review URL: https://codereview.chromium.org/300223013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/get_syzygy_binaries.py')
-rwxr-xr-xbuild/get_syzygy_binaries.py27
1 files changed, 2 insertions, 25 deletions
diff --git a/build/get_syzygy_binaries.py b/build/get_syzygy_binaries.py
index f11eae8..999d8ce 100755
--- a/build/get_syzygy_binaries.py
+++ b/build/get_syzygy_binaries.py
@@ -7,14 +7,12 @@
import cStringIO
import hashlib
-import errno
import json
import logging
import optparse
import os
import re
import shutil
-import stat
import subprocess
import urllib2
import zipfile
@@ -174,27 +172,6 @@ def _DirIsEmpty(path):
return not dirs and not files
-def _RmTreeHandleReadOnly(func, path, exc):
- """An error handling function for use with shutil.rmtree. This will
- detect failures to remove read-only files, and will change their properties
- prior to removing them. This is necessary on Windows as os.remove will return
- an access error for read-only files, and git repos contain read-only
- pack/index files.
- """
- excvalue = exc[1]
- if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES:
- _LOGGER.debug('Removing read-only path: %s', path)
- os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
- func(path)
- else:
- raise
-
-
-def _RmTree(path):
- """A wrapper of shutil.rmtree that handles read-only files."""
- shutil.rmtree(path, ignore_errors=False, onerror=_RmTreeHandleReadOnly)
-
-
def _CleanState(output_dir, state, dry_run=False):
"""Cleans up files/directories in |output_dir| that are referenced by
the given |state|. Raises an error if there are local changes. Returns a
@@ -239,7 +216,7 @@ def _CleanState(output_dir, state, dry_run=False):
if os.path.exists(p) and _DirIsEmpty(p):
_LOGGER.debug('Deleting empty directory "%s".', p)
if not dry_run:
- _RmTree(p)
+ shutil.rmtree(p, False)
return deleted
@@ -379,7 +356,7 @@ def main():
# If overwrite was specified then take a heavy-handed approach.
_LOGGER.debug('Deleting entire installation directory.')
if not options.dry_run:
- _RmTree(options.output_dir)
+ shutil.rmtree(options.output_dir, False)
else:
# Otherwise only delete things that the previous installation put in place,
# and take care to preserve any local changes.