HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/mail.pyc
ó
ÛXc@@sØddlmZmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlmZmZmZmZejjjZd„Zeejjdeƒdejfd	„ƒYZd
ejfd„ƒYZd„Zd
„Zd„Zdd„Z dd„Z!d„Z"d„Z#de$d„Z%d„Z&d„Z'd„Z(de$d„Z)dd„Z*de$d„Z+de$d„Z,de$d„Z-d„Z.dS(i(tabsolute_importtprint_functionNi(t_(tencodingterrortsslutiltutilcO@sd|d<t|||ŽdS(sÐ
    Python 2.7 introduces a backwards incompatible change
    (Python issue1974, r70772) in email.Generator.Generator code:
    pre-2.7 code passed "continuation_ws='	'" to the Header
    constructor, and 2.7 removed this parameter.

    Default argument is continuation_ws=' ', which means that the
    behavior is different in <2.7 and 2.7

    We consider the 2.7 behavior to be preferable, but need
    to have an unified behavior for versions 2.4 to 2.7
    t tcontinuation_wsN(t_oldheaderinit(tselftargstkw((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt_unifiedheaderinits
t__init__tSTARTTLScB@s)eZdZdd„Zddd„ZRS(sŒDerived class to verify the peer certificate for STARTTLS.

    This class allows to pass any keyword arguments to SSL socket creation.
    cK@s)tjj||||_||_dS(N(tsmtplibtSMTPRt_uit_host(R
tuithosttkwargs((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyR5s	cC@s»|jdƒs'd}tj|ƒ‚n|jdƒ\}}|dkr±tj|j||d|jd|jƒ|_tj	|jƒ|_
d|_d|_
i|_d|_n||fS(Ntstarttlss*STARTTLS extension not supported by serverRiÜRtserverhostnamei(thas_extnRt
SMTPExceptiontdocmdRt
wrapsockettsockRRtSSLFakeFiletfiletNonet	helo_respt	ehlo_resptesmtp_featurest
does_esmtp(R
tkeyfiletcertfiletmsgtresptreply((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyR:s				N(t__name__t
__module__t__doc__R RR(((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyR0stSMTPScB@s)eZdZdddd„Zd„ZRS(s‰Derived class to verify the peer certificate for SMTPS.

    This class allows to pass any keyword arguments to SSL socket creation.
    cK@sG||_||_tjj||||_tj|_||_dS(N(	R%R&RRRRt
SMTP_SSL_PORTtdefault_portR(R
RR%R&RR((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyROs			cC@s‰|jdkr.td||fdtjƒntj||f|ƒ}tj||j|j	d|j
d|jƒ}tj
|ƒ|_|S(Nisconnect:RRR(t
debugleveltprinttsyststderrtsockettcreate_connectionRRR%R&RRRRR(R
Rtportttimeoutt
new_socket((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt_get_socketXs		N(R*R+R,R RR9(((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyR-Js	c@s£|jddƒ}|jdddƒ}|dkp?tj|ƒ}|dk}|sZ|r…tjtdƒr…tjtdƒƒ‚n|jdd	ƒ}|sµtjtd
ƒƒ‚n|ré|jtdƒƒt	|d|d	|ƒ‰n3|r
t
|d|d	|ƒ‰ntjd|ƒ‰|r+d}nd
}tj
|jdd|ƒƒ}|jtdƒ||fƒˆjd	|d|ƒ|r¼|jtdƒƒˆjƒˆjƒˆjƒn|sÈ|rî|jtdƒƒtjˆjƒn|jddƒ}|jddƒ}	|r.|	r.|jƒ}	n|r|	r|jtdƒ|ƒyˆj||	ƒWqtjk
rŒ}
tj|
ƒ‚qXn‡fd†}|S(s;build an smtp connection and return a function to send mailtsmtptlocal_hostnamettlstnoneRtsmtpstssls/can't use TLS: Python SSL support not installedRs+smtp.host not configured - cannot send mails(using smtps)
iÑiR6s$sending mail: smtp host %s, port %d
s(using starttls)
s(verifying remote certificate)
tusernametpasswords&(authenticating to mail server as %s)
c@sšyˆj|||ƒSWn|tjk
rq}g|jjƒD]}|d^q<}tjddj|ƒƒ‚n%tjk
r•}tj|ƒ‚nXdS(Nis
(	tsendmailRtSMTPRecipientsRefusedt
recipientstvaluesRtAborttjoinR(tsenderRDR'tinsttr(ts(s2/usr/lib/python2.7/dist-packages/mercurial/mail.pytsend’s&(tconfigRt	parsebooltsafehasattrR4RRFRtnoteR-RRRtgetporttconnecttehloRRtvalidatesocketRtgetpasstloginR(RR;R<RR>tmailhosttdefaultporttmailportR@RARIRL((RKs2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt_smtpcsV	



	cC@s×|jdddƒ}d|tj|ƒdjttj|ƒƒf}|jtdƒ|ƒtj|dƒ}|j|ƒ|j	ƒ}|rÓt
jdtj
j|jdd	ƒd
ƒtj|ƒd
fƒ‚ndS(ssend mail using sendmail.temailtmethodR:s%s -f %s %sRssending mail: %s
tws%s %siiN(RMRR[RGtmapRPRtpopentwritetcloseRRFtostpathtbasenametsplitR texplainexit(RRHRDR'tprogramtcmdlinetfptret((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt	_sendmails
	cC@sft|dƒ}tjdtjƒƒ}|jd||fƒ|j|ƒ|jdƒ|jƒdS(swrite mails to mboxsab+s%a %b %d %H:%M:%S %YsFrom %s %s
s

N(topenttimetstrftimet	localtimeR`Ra(tmboxRHRDR'Ritdate((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt_mbox«s

c@sXˆr&tˆdƒjƒ‡fd†SˆjdddƒdkrKtˆƒS‡fd†S(snmake a mail connection. return a function to send mail.
    call as sendmail(sender, list-of-recipients, msg).twbc@stˆ|||ƒS(N(Rr(RKRJtm(Rp(s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt<lambda>»sR[R\R:c@stˆ|||ƒS(N(Rk(RKRJRt(R(s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyRu¾s(RlRaRMRZ(RRp((RpRs2/usr/lib/python2.7/dist-packages/mercurial/mail.pyRR¶s

cC@s"t|d|ƒ}||||ƒS(NRp(RR(RRHRDR'RpRL((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyRBÀscC@s}|jdddƒ}|dkrN|jddƒsytjtdƒƒ‚qyn+tj|ƒsytjtdƒ|ƒ‚ndS(s=determine if we have enough config data to try sending email.R[R\R:Rs>smtp specified as email transport, but no smtp host configureds0%r specified as email transport, but not in PATHN(RMRRFRRtfindexe(RR\((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pytvalidateconfigÄscC@sJtjj|ƒjjƒ}|jdƒrF|jdƒrFd|dS|S(ttisosiso-i(R[tcharsettCharsett
input_charsettlowert
startswith(tcs((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt
codec2ianaÐstplaincC@sŠddtjtjg}|r.t||dƒSxI|D]A}y'|j|ƒt||t|ƒƒSWq5tk
ruq5Xq5Wt||dƒS(s2Return MIME message suitable for a patch.
    Charset will be detected by first trying to decode as us-ascii, then utf-8,
    and finally the global encodings. If all those fail, fall back to
    ISO-8859-1, an encoding with that allows all byte sequences.
    Transfer encodings will be used if necessary.sus-asciisutf-8s
iso-8859-1(Rtfallbackencodingt
mimetextqptdecodeR€tUnicodeDecodeError(RKtsubtypetdisplayRRz((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt
mimetextpatchÙs


cC@s~d}x?|jƒD]1}t|ƒdkrtj|ƒ}d}PqqWtjj|||ƒ}|rz|d=||d<n|S(s[Return MIME message.
    Quoted-printable transfer encoding will be used if necessary.
    i¶squoted-printablesContent-Transfer-EncodingN(R t
splitlinestlentquopritencodestringR[tMIMEText(tbodyR†RztenctlineR'((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyRƒìs
cC@sŸg|jddƒD]}|jƒ^q}tjjƒtjjƒdg}x*|D]"}||krS|j|ƒqSqSWg|D]}|jdƒs€|^q€S(s;Obtains charsets to send mail parts not containing patches.R[tcharsetssutf-8tascii(t
configlistR}RR‚tappendtendswith(RRR‘t	fallbacks((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt	_charsetsýs+
cC@sëy|jdƒWnÍtk
rà|p0t|ƒ}x«tjtjfD]“}y|j|ƒ}Wntk
ruqFnXx`|D]X}y|j|ƒ|fSWq}tk
r­q}tk
rÔ|jt	dƒ|ƒq}Xq}WqFWnX|dfS(sReturns (converted) string, charset tuple.
    Finds out best charset by cycling through sendcharsets in descending
    order. Tries both encoding and fallbackencoding for input. Only as
    last resort send as is in fake ascii.
    Caveat: Do not use for mail parts containing patches!R’s!ignoring invalid sendcharset: %s
sus-ascii(
R„R…R—RR‚tencodetUnicodeEncodeErrortLookupErrortwarnR(RRKR‘tsendcharsetsticstutocs((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt_encodes"




'cC@s;|s7t|||ƒ\}}ttjj||ƒƒS|S(s4Returns RFC-2047 compliant header from given string.(R tstrR[theadertHeader(RRKR‘R‡R((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt
headencode scC@søt|||ƒ}yS|jdƒ\}}|jdƒ}|jtjƒjdƒ}d||f}Wnztk
r‘tjtdƒ|ƒ‚nQt	k
ráy|jdƒ}Wqâtk
rÝtjtdƒ|ƒ‚qâXnXt
jj||fƒS(Nt@R’tidnas%s@%ssinvalid email address: %ssinvalid local address: %s(
R¤ReR˜R„RR…RRFRt
ValueErrorR[tUtilst
formataddr(RtnametaddrR‘tacctdom((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt_addressencode(s


!cC@sB|s
|r|pdStjj|ƒ\}}t||||ƒS(s-Turns address into RFC-2047 compliant header.Rx(R[R¨t	parseaddrR®(RtaddressR‘R‡RªR«((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt
addressencode9s

cC@s‡|r/g|D]}|jƒr
|jƒ^q
Sg}xKtjj|ƒD]7\}}|s`|rH|jt||||ƒƒqHqHW|S(s¶Turns a list of addresses into a list of RFC-2047 compliant headers.
    A single element of input list may contain multiple addresses, but output
    always has one address per item(tstripR[R¨tgetaddressesR”R®(RtaddrsR‘R‡tatresultRªR«((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pytaddrlistencode@s)#cC@s7d}|s't|||ƒ\}}nt|d|ƒS(sgcreates mime text object, encodes it if needed, and sets
    charset and transfer-encoding accordingly.sus-asciiR(R Rƒ(RRKR‘R‡R((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt
mimeencodeMscC@sÏg}x§tjj|ƒD]“\}}|dk	rey|j|j|ƒƒwWqetk
raqeXny|j|jdƒƒwWntk
r•nX|j|jdƒƒqWtjdj	|ƒj
dƒƒS(sDecodes RFC-2047 headersUTF-8s
ISO-8859-1u N(R[R¢t
decode_headerR R”R„R…RttolocalRGR˜(RKtupartstpartRz((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt
headdecodeUs

(/t
__future__RRR[t
email.charsettemail.headerRbR‹RR4R2Rmti18nRRxRRRRR¢R£RR	R
tsetattrRRR-RZRkRrR RRRBRwR€tFalseRˆRƒR—R R¤R®R±R·R¸R½(((s2/usr/lib/python2.7/dist-packages/mercurial/mail.pyt<module>sB"		: