Spade
Mini Shell
| Directory:~$ /proc/self/root/lib/python2.7/site-packages/certbot/plugins/ |
| [Home] [System Details] [Kill Me] |
�
���_c@sgdZddlZddlmZddlmZddlmZeje �Z
d�Zd�ZdS(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.pytget_prefixess
cCs�tjd}g}x;tD]3}||kr|tj|7}|j|�qqWt|�r�tjd|tjj|��|tjd<nt j
|�r�tSt|�r�dnd}tjd|||�tS(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.pytpath_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