| 147 | return debugger_cli_common.rich_text_lines_from_rich_line_list(lines) |
| 148 | |
| 149 | def _load_from_file(self): |
| 150 | try: |
| 151 | with gfile.Open(self._config_file_path, "r") as config_file: |
| 152 | config_dict = json.load(config_file) |
| 153 | config = collections.OrderedDict() |
| 154 | for key in sorted(config_dict.keys()): |
| 155 | config[key] = config_dict[key] |
| 156 | return config |
| 157 | except (IOError, ValueError): |
| 158 | # The reading of the config file may fail due to IO issues or file |
| 159 | # corruption. We do not want tfdbg to error out just because of that. |
| 160 | return dict() |