/usr/lib/python3.6/site-packages/certbot/plugins/__pycache__
Edit: /usr/lib/python3.6/site-packages/certbot/plugins/__pycache__/util.cpython-36.pyc (1835B)
3
Ú¯a ã @ sn d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ej
eƒZe
ee
dœdd „Ze
ed
œdd„ZdS )
zPlugin utilities.é N)ÚList)Úutil)Úos)ÚSTANDARD_BINARY_DIRS)ÚpathÚreturnc C sF t jj| ƒ}g }x0|r@|j|ƒ t jj|ƒ\}}||d krP qW |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 r ÚnormpathÚappendÚsplit)r ÚprefixÚprefixesÚ_© r ú/usr/lib/python3.6/util.pyÚget_prefixes s
r )Úcmdr c C s– t jd }g }x,tD ]$}||kr|t j| 7 }|j|ƒ qW t|ƒrdtjd| t jj|ƒƒ |t jd<