File "util.cpython-36.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/python3.6/site-packages/certbot/plugins/__pycache__/util.cpython-36.pyc
File size: 1.79 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

3

گa@sndZddlZddlmZddlmZddlmZddlm	Z	ej
eZe
ee
ddd	Ze
ed
ddZdS)
zPlugin utilities.N)List)util)os)STANDARD_BINARY_DIRS)pathreturncCsFtjj|}g}x0|r@|j|tjj|\}}||dkrPqW|S)aRetrieves 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`
    )rrnormpathappendsplit)rprefixprefixes_r/usr/lib/python3.6/util.pyget_prefixess
r)cmdrcCstjd}g}x,tD]$}||kr|tj|7}|j|qWt|rdtjd|tjj||tjd<t	j
|rrdSt|r~dnd}tjd|||dS)zAttempt 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
    PATHz6Can't find %s, attempting PATH mitigation by adding %sTz	 expandedz*Failed to find executable %s in%s PATH: %sF)renvironrpathsepranyloggerdebugjoinrZ
exe_exists)rrZaddeddZexpandedrrrpath_surgery#s 	



r)__doc__ZloggingZtypingrZcertbotrZcertbot.compatrZcertbot.compat.miscrZ	getLogger__name__rstrrboolrrrrr<module>s