Read a file.
(path)
| 332 | |
| 333 | |
| 334 | def read_file(path): |
| 335 | """ Read a file. """ |
| 336 | if os.path.exists(path): |
| 337 | fp = open(path, 'r') |
| 338 | data = fp.read() |
| 339 | fp.close() |
| 340 | return data |
| 341 | else: |
| 342 | raise Exception("Path does not exist: %s" % (path)) |
| 343 | |
| 344 | |
| 345 | def read_config_file(path): |
no outgoing calls
no test coverage detected