| 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 under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import BaseHTTPServer | 5 import BaseHTTPServer |
| 6 import json | 6 import json |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import SocketServer | 9 import SocketServer |
| 10 import sys | 10 import sys |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 def _run(self): | 118 def _run(self): |
| 119 self._httpd.serve_forever() | 119 self._httpd.serve_forever() |
| 120 | 120 |
| 121 | 121 |
| 122 def gen_zip(url): | 122 def gen_zip(url): |
| 123 """Returns swarming_bot.zip content.""" | 123 """Returns swarming_bot.zip content.""" |
| 124 with open(os.path.join(BOT_DIR, 'config', 'bot_config.py'), 'rb') as f: | 124 with open(os.path.join(BOT_DIR, 'config', 'bot_config.py'), 'rb') as f: |
| 125 bot_config_content = f.read() | 125 bot_config_content = f.read() |
| 126 return bot_archive.get_swarming_bot_zip( | 126 return bot_archive.get_swarming_bot_zip( |
| 127 BOT_DIR, url, '1', {'config/bot_config.py': bot_config_content}, False) | 127 BOT_DIR, url, '1', {'config/bot_config.py': bot_config_content}, None) |
| OLD | NEW |