-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/httpclient/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pyc

ó
Ì\,Tc	@sQdZddlZddlZejeƒZyddlZejeZ	WnAe
k
rddlZddlZe
edeƒZ	eZnXy
ejZWnek
r·d„ZnXeråejZejZejZejZnRdejfd„ƒYZdZdZd	ZdZddeeedeed
„Zdefd„ƒYZdS(
sÅAbstraction to simplify socket use for Python < 2.6

This will attempt to use the ssl module and the new
socket.create_connection method, but fall back to the old
methods if those are unavailable.
iÿÿÿÿNtHTTPSHandlercCsñ|\}}d}d}xºtj||dtjƒD]}|\}}}}	}
y9tj|||ƒ}tjd||ƒ|j|
ƒWnEtjk
rÏ}tjd||ƒ|rÃ|jƒnd}q4nXPq4W|sítj|ƒ‚n|S(s5Backport of socket.create_connection from Python 2.6.s!getaddrinfo returns an empty listisconnect: (%s, %s)sconnect fail: %s %sN(	tNonetsockettgetaddrinfotSOCK_STREAMtloggertinfotconnectterrortclose(taddressthosttporttmsgtsocktrestaftsocktypetprototunused_canonnametsa((sC/usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pytcreate_connection7s(
t
FakeSocketcBseZdZddd„ZRS(s!Socket wrapper that supports SSL.iicCs‚|dkr"td|jƒ‚nxYtr}y|jj|ƒSWq%tjk
ry}|jdtjkrpq%qz|‚q%Xq%WdS(s1ssl-aware wrapper around socket.recv
            is3non-zero flags not allowed in calls to recv() on %sN(	t
ValueErrort	__class__tTruet_ssltreadRtsslerrortargstSSL_ERROR_WANT_READ(tselftbuflentflagstx((sC/usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pytrecv]s	(t__name__t
__module__t__doc__R#(((sC/usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pyRTsiiic	
CsC|tkr!|r!tdƒ‚ntj|ƒ}	t||	ƒ}|S(s,Backport of ssl.wrap_socket from Python 2.6.sUSSL certificate validation requires the ssl module(included in Python 2.6 and later.)(t	CERT_NONEt CertificateValidationUnsupportedRtsslR(
Rtkeyfiletcertfiletserver_sidet	cert_reqstssl_versiontca_certstdo_handshake_on_connecttsuppress_ragged_eofstsslob((sC/usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pytwrap_socketwsR(cBseZdZRS(sCException raised when cert validation is requested but unavailable.(R$R%R&(((sC/usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pyR(ˆs(R&tloggingRt	getLoggerR$RR)R3Rthave_ssltImportErrorthttplibturllib2tgetattrtFalseRtAttributeErrorR't
CERT_OPTIONALt
CERT_REQUIREDRt_PROTOCOL_SSLv23Rt	ExceptionR((((sC/usr/lib/python2.7/dist-packages/mercurial/httpclient/socketutil.pyt<module>"s@





			

Copyright © 2017 || Recoded By Mr.Bumblebee