In case filepath is a symlink, follow it until a real file is reached.
(filepath)
| 588 | return default |
| 589 | |
| 590 | def _follow_symlinks(filepath): |
| 591 | |
| 592 | """ In case filepath is a symlink, follow it until a |
| 593 | real file is reached. |
| 594 | """ |
| 595 | filepath = os.path.abspath(filepath) |
| 596 | while os.path.islink(filepath): |
| 597 | filepath = os.path.normpath( |
| 598 | os.path.join(os.path.dirname(filepath), os.readlink(filepath))) |
| 599 | return filepath |
| 600 | |
| 601 | |
| 602 | def _syscmd_file(target, default=''): |
no test coverage detected