Coverage for certbot/plugins/util.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Plugin utilities."""
"""Retrieves all possible path prefixes of a path, in descending order of length. For instance, (linux) /a/b/c returns ['/a/b/c', '/a/b', '/a', '/'] (windows) C:\\a\\b\\c returns ['C:\\a\\b\\c', 'C:\\a\\b', 'C:\\a', 'C:'] :param str path: the path to break into prefixes
:returns: all possible path prefixes of given path in descending order :rtype: `list` of `str` """ # break once we hit the root path
"""Attempt to perform PATH surgery to find cmd
Mitigates https://github.com/certbot/certbot/issues/1833
:param str cmd: the command that is being searched for in the PATH
:returns: True if the operation succeeded, False otherwise """
cmd, os.pathsep.join(added))
else: expanded, path) |