| OLD | NEW |
| 1 # Copyright 2014 The Swarming Authors. All rights reserved. | 1 # Copyright 2014 The Swarming 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 by the Apache v2.0 license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Runs either task_runner.py, bot_main.py or bot_config.py. | 5 """Runs either task_runner.py, bot_main.py or bot_config.py. |
| 6 | 6 |
| 7 The imports are done late so if an ImportError occurs, it is localized to this | 7 The imports are done late so if an ImportError occurs, it is localized to this |
| 8 command only. | 8 command only. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import code | 11 import code |
| 12 import json | 12 import json |
| 13 import logging | 13 import logging |
| 14 import os | 14 import os |
| 15 import optparse | 15 import optparse |
| 16 import shutil | 16 import shutil |
| 17 import signal | |
| 18 import sys | 17 import sys |
| 19 import zipfile | 18 import zipfile |
| 20 | 19 |
| 21 from bot_code import common | 20 from bot_code import common |
| 22 | 21 |
| 23 from third_party.depot_tools import fix_encoding | 22 from third_party.depot_tools import fix_encoding |
| 24 from utils import logging_utils | 23 from utils import logging_utils |
| 25 from utils import zip_package | 24 from utils import zip_package |
| 26 | 25 |
| 27 # This file can only be run as a zip. | 26 # This file can only be run as a zip. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 with zipfile.ZipFile(THIS_FILE, 'r') as f: | 184 with zipfile.ZipFile(THIS_FILE, 'r') as f: |
| 186 logging.error('Files in %s:\n%s', THIS_FILE, f.namelist()) | 185 logging.error('Files in %s:\n%s', THIS_FILE, f.namelist()) |
| 187 return 1 | 186 return 1 |
| 188 | 187 |
| 189 print >> sys.stderr, 'Unknown command %s' % cmd | 188 print >> sys.stderr, 'Unknown command %s' % cmd |
| 190 return 1 | 189 return 1 |
| 191 | 190 |
| 192 | 191 |
| 193 if __name__ == '__main__': | 192 if __name__ == '__main__': |
| 194 sys.exit(main()) | 193 sys.exit(main()) |
| OLD | NEW |