In case filepath is a symlink, follow it until a real file is reached.
(filepath)
| 701 | return default |
| 702 | |
| 703 | def _follow_symlinks(filepath): |
| 704 | |
| 705 | """ In case filepath is a symlink, follow it until a |
| 706 | real file is reached. |
| 707 | """ |
| 708 | filepath = os.path.abspath(filepath) |
| 709 | while os.path.islink(filepath): |
| 710 | filepath = os.path.normpath( |
| 711 | os.path.join(os.path.dirname(filepath), os.readlink(filepath))) |
| 712 | return filepath |
| 713 | |
| 714 | |
| 715 | def _syscmd_file(target, default=''): |
no test coverage detected