(file_name)
| 11 | |
| 12 | |
| 13 | def read_file(file_name): |
| 14 | content = None |
| 15 | _, tail = path.split(file_name) |
| 16 | is_latin = tail == "invalid_utf8_sequence.sol" |
| 17 | try: |
| 18 | with open(file_name, "r", encoding="latin-1" if is_latin else ENCODING) as f: |
| 19 | content = f.read() |
| 20 | finally: |
| 21 | if content is None: |
| 22 | print(f"Error reading: {file_name}") |
| 23 | return content |
| 24 | |
| 25 | |
| 26 | def write_file(file_name, content): |
no outgoing calls
no test coverage detected