mirror of
https://github.com/certbot/certbot.git
synced 2026-01-26 07:41:33 +03:00
There are still some left, but the `modification_check` test fails. Some are still in `tools`, and they can probably be removed as well. `with_statement` was introduced officially in Python 2.5, so there's really old stuff in the code base.
18 lines
353 B
Python
Executable File
18 lines
353 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.
|
|
|
|
"""
|
|
import os
|
|
import sys
|
|
|
|
|
|
def main(link):
|
|
return os.path.realpath(link)
|
|
|
|
if __name__ == '__main__':
|
|
print(main(sys.argv[1]))
|