(filename)
| 16 | # Read a file within the source tree that may or may not exist, and |
| 17 | # decode its contents as UTF-8, regardless of external locale settings. |
| 18 | def read_file(filename): |
| 19 | filepath = os.path.join(SRCDIR, filename) |
| 20 | try: |
| 21 | raw = open(filepath, "rb").read() |
| 22 | except (IOError, OSError): |
| 23 | return "" |
| 24 | return raw.decode("utf-8") |
| 25 | |
| 26 | |
| 27 | # Discard unwanted top matter from README.md for reuse as the long |
no outgoing calls
no test coverage detected