| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
| 4 # found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
| 5 | 5 |
| 6 """Starts a local bot to connect to a local server.""" | 6 """Starts a local bot to connect to a local server.""" |
| 7 | 7 |
| 8 import glob | 8 import glob |
| 9 import os | 9 import os |
| 10 import signal | 10 import signal |
| 11 import socket | 11 import socket |
| 12 import sys | 12 import sys |
| 13 import tempfile | 13 import tempfile |
| 14 import urllib | 14 import urllib |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 bot.dump_log() | 133 bot.dump_log() |
| 134 except KeyboardInterrupt: | 134 except KeyboardInterrupt: |
| 135 print >> sys.stderr, '<Ctrl-C> received; stopping bot' | 135 print >> sys.stderr, '<Ctrl-C> received; stopping bot' |
| 136 finally: | 136 finally: |
| 137 exit_code = bot.stop(False) | 137 exit_code = bot.stop(False) |
| 138 return exit_code | 138 return exit_code |
| 139 | 139 |
| 140 | 140 |
| 141 if __name__ == '__main__': | 141 if __name__ == '__main__': |
| 142 sys.exit(main()) | 142 sys.exit(main()) |
| OLD | NEW |