OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2010, The Native Client SDK Authors. All Rights Reserved. | 3 # Copyright 2010, The Native Client SDK Authors. All Rights Reserved. |
4 # Use of this source code is governed by a BSD-style license that can | 4 # Use of this source code is governed by a BSD-style license that can |
5 # be found in the LICENSE file. | 5 # be found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 """A tiny web server. | 8 """A tiny web server. |
9 | 9 |
10 This is intended to be used for testing, and | 10 This is intended to be used for testing, and |
11 only run from within the | 11 only run from within the |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 logging.info("Shutting down local server on port %d", server_address[1]) | 100 logging.info("Shutting down local server on port %d", server_address[1]) |
101 | 101 |
102 | 102 |
103 if __name__ == '__main__': | 103 if __name__ == '__main__': |
104 #SanityCheckDirectory() | 104 #SanityCheckDirectory() |
105 if len(sys.argv) > 1: | 105 if len(sys.argv) > 1: |
106 Run((SERVER_HOST, int(sys.argv[1]))) | 106 Run((SERVER_HOST, int(sys.argv[1]))) |
107 else: | 107 else: |
108 Run((SERVER_HOST, SERVER_PORT)) | 108 Run((SERVER_HOST, SERVER_PORT)) |
109 sys.exit(0) | 109 sys.exit(0) |
OLD | NEW |