Spade

Mini Shell

Directory:~$ /proc/self/root/lib/python2.7/site-packages/certbot/plugins/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ //proc/self/root/lib/python2.7/site-packages/certbot/plugins/util.pyo

�
���_c@sgdZddlZddlmZddlmZddlmZeje	�Z
d�Zd�ZdS(sPlugin
utilities.i����N(tutil(tos(tSTANDARD_BINARY_DIRScCsbtjj|�}g}xC|r]|j|�tjj|�\}}||dkrPqqW|S(s�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`
   
i����(Rtpathtnormpathtappendtsplit(Rtprefixtprefixest_((s8/usr/lib/python2.7/site-packages/certbot/plugins/util.pytget_prefixess
	
cCs�tjd}g}x;tD]3}||kr|tj|7}|j|�qqWt|�r�tjd|tjj|��|tjd<nt	j
|�r�tSt|�r�dnd}tjd|||�tS(s�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
    tPATHs6Can't find %s, attempting PATH mitigation by adding %ss	
expandedts*Failed to find executable %s in%s PATH:
%s(
RtenvironRtpathsepRtanytloggertdebugtjoinRt
exe_existstTruetFalse(tcmdRtaddedtdtexpanded((s8/usr/lib/python2.7/site-packages/certbot/plugins/util.pytpath_surgery
s 	

	
(
t__doc__tloggingtcertbotRtcertbot.compatRtcertbot.compat.miscRt	getLoggert__name__RR
R(((s8/usr/lib/python2.7/site-packages/certbot/plugins/util.pyt<module>s