• File: util.pyo
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/certbot/plugins/util.pyo
  • Date Modified: 10/08/2021 7:08 AM
  • File size: 2.08 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

_c@sgdZddlZddlmZddlmZddlmZeje	Z
dZdZdS(sPlugin utilities.iN(tutil(tos(tSTANDARD_BINARY_DIRScCsbtjj|}g}xC|r]|j|tjj|\}}||dkrPqqW|S(sRetrieves 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
	
cCstjd}g}x;tD]3}||kr|tj|7}|j|qqWt|rtjd|tjj||tjd<nt	j
|rtSt|rdnd}tjd|||tS(sAttempt 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