| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import logging | 5 import logging |
| 6 import os | 6 import os |
| 7 import stat | 7 import stat |
| 8 | 8 |
| 9 from catapult_base import cloud_storage | 9 from catapult_base import cloud_storage |
| 10 from catapult_base import support_binaries | 10 from catapult_base import support_binaries |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 if not os.path.exists(download_dir): | 258 if not os.path.exists(download_dir): |
| 259 os.makedirs(download_dir) | 259 os.makedirs(download_dir) |
| 260 | 260 |
| 261 cloud_storage.GetIfHashChanged(cs_path, download_path, cs_bucket, cs_hash) | 261 cloud_storage.GetIfHashChanged(cs_path, download_path, cs_bucket, cs_hash) |
| 262 if not os.path.exists(download_path): | 262 if not os.path.exists(download_path): |
| 263 raise exceptions.FileNotFoundError(download_path) | 263 raise exceptions.FileNotFoundError(download_path) |
| 264 #TODO(aiolos): Add support for unzipping files. | 264 #TODO(aiolos): Add support for unzipping files. |
| 265 os.chmod(download_path, | 265 os.chmod(download_path, |
| 266 stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP) | 266 stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP) |
| 267 return os.path.abspath(download_path) | 267 return os.path.abspath(download_path) |
| 268 |
| OLD | NEW |