certbot.plugins.util module
certbot.plugins.util module
Plugin utilities.
certbot.plugins.util.get_prefixes(path: str) list[str][source]
Retrieves all possible path prefixes of a path, in descending order of length. For instance:
(Linux)
/a/b/creturns['/a/b/c','/a/b','/a','/'](Windows)
C:abcreturns['C:abc','C:ab','C:a','C:']
Parameters:
path (str) – the path to break into prefixes
Returns:
all possible path prefixes of given path in descending order
certbot.plugins.util.path_surgery(cmd: str) bool[source]
Attempt to perform PATH surgery to find cmd
Mitigates https://github.com/certbot/certbot/issues/1833
Parameters:
cmd (str) – the command that is being searched for in the PATH
Returns:
True if the operation succeeded, False otherwise
这篇文档对你有帮助吗?
谢谢你的反馈!