| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 # | 3 # |
| 4 # Use of this source code is governed by a BSD-style license | 4 # Use of this source code is governed by a BSD-style license |
| 5 # that can be found in the LICENSE file in the root of the source | 5 # that can be found in the LICENSE file in the root of the source |
| 6 # tree. An additional intellectual property rights grant can be found | 6 # tree. An additional intellectual property rights grant can be found |
| 7 # in the file PATENTS. All contributing project authors may | 7 # in the file PATENTS. All contributing project authors may |
| 8 # be found in the AUTHORS file in the root of the source tree. | 8 # be found in the AUTHORS file in the root of the source tree. |
| 9 | 9 |
| 10 """Setup links to a Chromium checkout for WebRTC. | 10 """Setup links to a Chromium checkout for WebRTC. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 def announce(self, planning): | 186 def announce(self, planning): |
| 187 if planning: | 187 if planning: |
| 188 logging.warn('Planning to remove directory: %s', self._path) | 188 logging.warn('Planning to remove directory: %s', self._path) |
| 189 else: | 189 else: |
| 190 logging.warn('Removing directory: %s', self._path) | 190 logging.warn('Removing directory: %s', self._path) |
| 191 | 191 |
| 192 def doit(self, _): | 192 def doit(self, _): |
| 193 if sys.platform.startswith('win'): | 193 if sys.platform.startswith('win'): |
| 194 # shutil.rmtree() doesn't work on Windows if any of the directories are | 194 # shutil.rmtree() doesn't work on Windows if any of the directories are |
| 195 # read-only, which svn repositories are. | 195 # read-only. |
| 196 subprocess.check_call(['rd', '/q', '/s', self._path], shell=True) | 196 subprocess.check_call(['rd', '/q', '/s', self._path], shell=True) |
| 197 else: | 197 else: |
| 198 shutil.rmtree(self._path) | 198 shutil.rmtree(self._path) |
| 199 | 199 |
| 200 | 200 |
| 201 class Makedirs(Action): | 201 class Makedirs(Action): |
| 202 def __init__(self, path): | 202 def __init__(self, path): |
| 203 super(Makedirs, self).__init__(dangerous=False) | 203 super(Makedirs, self).__init__(dangerous=False) |
| 204 self._priority = 1 | 204 self._priority = 1 |
| 205 self._path = path | 205 self._path = path |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 except LinkError as e: | 502 except LinkError as e: |
| 503 print >> sys.stderr, e.message | 503 print >> sys.stderr, e.message |
| 504 return 3 | 504 return 3 |
| 505 finally: | 505 finally: |
| 506 links_database.close() | 506 links_database.close() |
| 507 return 0 | 507 return 0 |
| 508 | 508 |
| 509 | 509 |
| 510 if __name__ == '__main__': | 510 if __name__ == '__main__': |
| 511 sys.exit(main()) | 511 sys.exit(main()) |
| OLD | NEW |