mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56:55 +02:00
remove readlink (#9649)
This commit is contained in:
@@ -11,11 +11,9 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
import readlink
|
|
||||||
|
|
||||||
|
|
||||||
def find_tools_path():
|
def find_tools_path():
|
||||||
return os.path.dirname(readlink.main(__file__))
|
return os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
|
|
||||||
def call_with_print(command, env=None):
|
def call_with_print(command, env=None):
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/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]))
|
|
||||||
Reference in New Issue
Block a user