OLD | NEW |
1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
2 # | 2 # |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 if not args.output_dir: | 59 if not args.output_dir: |
60 args.output_dir = port_obj.default_results_directory() | 60 args.output_dir = port_obj.default_results_directory() |
61 | 61 |
62 # Create the output directory if it doesn't already exist. | 62 # Create the output directory if it doesn't already exist. |
63 port_obj.host.filesystem.maybe_make_directory(args.output_dir) | 63 port_obj.host.filesystem.maybe_make_directory(args.output_dir) |
64 | 64 |
65 server = server_constructor(port_obj, args.output_dir, **kwargs) | 65 server = server_constructor(port_obj, args.output_dir, **kwargs) |
66 server.start() | 66 server.start() |
67 try: | 67 try: |
68 _ = input_fn('Hit any key to stop the server and exit.') | 68 _ = input_fn('Hit any key to stop the server and exit.') |
69 except (KeyboardInterrupt, EOFError) as e: | 69 except (KeyboardInterrupt, EOFError): |
70 pass | 70 pass |
71 | 71 |
72 server.stop() | 72 server.stop() |
OLD | NEW |