/usr/lib/python3/dist-packages/certbot/plugins/__pycache__
Edit: /usr/lib/python3/dist-packages/certbot/plugins/__pycache__/util.cpython-310.pyc (1791B)
o
6a @ sN d Z ddlZddlmZ ddlmZ ddlmZ ee Z
dd Zdd ZdS )
zPlugin utilities. N)util)os)STANDARD_BINARY_DIRSc C sH t j| }g }|r"|| t j|\}}||d kr |S |s
|S )a 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`
)r pathnormpathappendsplit)r prefixprefixes_ r
6/usr/lib/python3/dist-packages/certbot/plugins/util.pyget_prefixes s
r c C s t jd }g }tD ]}||vr|t j| 7 }|| q t|r0td| t j| |t jd<