| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2016 The LUCI Authors. All rights reserved. | 3 # Copyright 2016 The LUCI Authors. All rights reserved. |
| 4 # Use of this source code is governed under the Apache License, Version 2.0 | 4 # Use of this source code is governed under the Apache License, Version 2.0 |
| 5 # that can be found in the LICENSE file. | 5 # that can be found in the LICENSE file. |
| 6 | 6 |
| 7 """Bootstrap script to clone and forward to the recipe engine tool. | 7 """Bootstrap script to clone and forward to the recipe engine tool. |
| 8 | 8 |
| 9 *********************************************************************** | 9 *********************************************************************** |
| 10 ** DO NOT MODIFY EXCEPT IN THE PER-REPO CONFIGURATION SECTION BELOW. ** | 10 ** DO NOT MODIFY EXCEPT IN THE PER-REPO CONFIGURATION SECTION BELOW. ** |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 try: | 155 try: |
| 156 ensure_engine() | 156 ensure_engine() |
| 157 except subprocess.CalledProcessError: | 157 except subprocess.CalledProcessError: |
| 158 logging.exception('ensure_engine failed') | 158 logging.exception('ensure_engine failed') |
| 159 | 159 |
| 160 # Retry errors. | 160 # Retry errors. |
| 161 time.sleep(random.uniform(2,5)) | 161 time.sleep(random.uniform(2,5)) |
| 162 ensure_engine() | 162 ensure_engine() |
| 163 | 163 |
| 164 args = ['--package', recipes_cfg_path, | 164 args = ['--package', recipes_cfg_path] + sys.argv[1:] |
| 165 '--bootstrap-script', __file__] + sys.argv[1:] | |
| 166 return _subprocess_call([ | 165 return _subprocess_call([ |
| 167 sys.executable, '-u', | 166 sys.executable, '-u', |
| 168 os.path.join(engine_path, engine_subpath, 'recipes.py')] + args) | 167 os.path.join(engine_path, engine_subpath, 'recipes.py')] + args) |
| 169 | 168 |
| 170 if __name__ == '__main__': | 169 if __name__ == '__main__': |
| 171 sys.exit(main()) | 170 sys.exit(main()) |
| OLD | NEW |