1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-27 19:42:53 +03:00
Files
certbot/tools/readlink.py
Adrien Ferrand e048da1e38 Reorganize imports (#7616)
* Isort execution

* Fix pylint, adapt coverage

* New isort

* Fix magic_typing lint

* Second round

* Fix pylint

* Third round. Store isort configuration

* Fix latest mistakes

* Other fixes

* Add newline

* Fix lint errors
2019-12-09 15:50:20 -05:00

20 lines
392 B
Python
Executable File

#!/usr/bin/env python
"""Canonicalizes a path and follows any symlinks.
This is the equivalent of `readlink -f` on many Linux systems. This is
useful as there are often differences in readlink on different
platforms.
"""
from __future__ import print_function
import os
import sys
def main(link):
return os.path.realpath(link)
if __name__ == '__main__':
print(main(sys.argv[1]))