| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 class Shell(object): | 6 class Shell(object): |
| 7 """Represents an abstract Mojo shell.""" | 7 """Represents an abstract Mojo shell.""" |
| 8 | 8 |
| 9 def serve_local_directories(self, mappings, port=0, reuse_servers=False): | 9 def serve_local_directories(self, mappings, port, reuse_servers=False): |
| 10 """Serves the content of the local (host) directories, making it available | 10 """Serves the content of the local (host) directories, making it available |
| 11 to the shell under the url returned by the function. | 11 to the shell under the url returned by the function. |
| 12 | 12 |
| 13 The server will run on a separate thread until the program terminates. The | 13 The server will run on a separate thread until the program terminates. The |
| 14 call returns immediately. | 14 call returns immediately. |
| 15 | 15 |
| 16 Args: | 16 Args: |
| 17 mappings: List of tuples (prefix, local_base_path_list) mapping URLs that | 17 mappings: List of tuples (prefix, local_base_path_list) mapping URLs that |
| 18 start with |prefix| to one or more local directories enumerated in | 18 start with |prefix| to one or more local directories enumerated in |
| 19 |local_base_path_list|. The prefixes should skip the leading slash. | 19 |local_base_path_list|. The prefixes should skip the leading slash. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 terminated | 59 terminated |
| 60 | 60 |
| 61 Returns: | 61 Returns: |
| 62 A tuple of (return_code, output, did_time_out). |return_code| is the exit | 62 A tuple of (return_code, output, did_time_out). |return_code| is the exit |
| 63 code returned by the shell or None if the exit code cannot be retrieved. | 63 code returned by the shell or None if the exit code cannot be retrieved. |
| 64 |output| is the stdout mingled with the stderr produced by the shell. | 64 |output| is the stdout mingled with the stderr produced by the shell. |
| 65 |did_time_out| is True iff the shell was terminated because it exceeded | 65 |did_time_out| is True iff the shell was terminated because it exceeded |
| 66 the |timeout| and False otherwise. | 66 the |timeout| and False otherwise. |
| 67 """ | 67 """ |
| 68 raise NotImplementedError() | 68 raise NotImplementedError() |
| OLD | NEW |