| OLD | NEW |
| 1 # Copyright 2014 The LUCI Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 # Bootstraps a swarming bot to connect host_url. 'host_url = "foo"' is | 5 # Bootstraps a swarming bot to connect host_url. 'host_url = "foo"' is |
| 6 # added on top of this file by the HTTP handler that serves this file. This file | 6 # added on top of this file by the HTTP handler that serves this file. This file |
| 7 # must be concise since it is executed directly at the CLI. | 7 # must be concise since it is executed directly at the CLI. |
| 8 # pylint: disable=E0602 | 8 # pylint: disable=E0602 |
| 9 import os, urllib, sys | 9 import os, urllib, sys |
| 10 urllib.urlretrieve('%s/bot_code' % host_url, 'swarming_bot.zip') | 10 urllib.urlretrieve('%s/bot_code' % host_url, 'swarming_bot.zip') |
| 11 os.execv(sys.executable, [sys.executable, 'swarming_bot.zip']) | 11 os.execv(sys.executable, [sys.executable, 'swarming_bot.zip']) |
| OLD | NEW |