� zfc@s�dZddlZddlZddlZddlZddlZddlZddlZddlm Z dddddd d d d d ddddddddddddddddddgZ d Z d!Z ejd"kr�dd#lmZmZn:ejd$kr dd#lmZmZnd%�Zd&�Zeaeeed'�Zeeeed(�Zd)�ZyddlZWn eZnXeZd*efd+��YZiZdfd,��YZdefd-��YZ ea!d.�Z"ea#d/�Z$ea%d0�Z&ea'd1�Z(d2fd3��YZ)d4fd5��YZ*d6e*fd7��YZ+d8e*fd9��YZ,d:e*fd;��YZ-ye.Wne/k r�d<�Z0n Xd=�Z0d>�Z1d?�Z2ea3d@�Z4ea5dA�Z6ea7dB�Z8ea9dC�Z:ea;dD�Z<ea=ddE�Z>ea?dF�Z@eaAdG�ZBdH�ZCeaDdI�ZEdJZFeGdK�eFD��ZHejIdL�ZJdM�ZKdN�ZLdOZMiZNxfeOePdP�eQeRePdP����D]=\ZSZTeSdQko�eTeMkr�eTn dRjUeS�eNeT|j |||�S|j||�Sny9|d krst|| �|�St|| �||�SWn2tjk r�} td | ftj�d �nXd S( s6Use URLopener().open(file) instead of open(file, 'r').tsafes%/:=&?~#+!$,;'@()*[]|trbRItopen_t-t_topen_local_files socket erroriN(RttoBytesRRDR't addinfourlRR"RR%ttypetreplacethasattrtopen_unknown_proxyt open_unknowntgetattrtsocketterrorR3tsystexc_info(R6tfullurlR)R,theaderstfpturltypeR(tproxyt proxyhostthosttselectortnametmsg((s/usr/lib64/python2.7/urllib.pyR'�s8     cCs(t|�\}}tdd|f�dS(s/Overridable interface to open unknown URL type.s url errorsunknown url typeN(RR3(R6R_R)RUR(((s/usr/lib64/python2.7/urllib.pyRY�scCs,t|�\}}tdd||f�dS(s/Overridable interface to open unknown URL type.s url errorsinvalid proxy for %sN(RR3(R6RcR_R)RUR(((s/usr/lib64/python2.7/urllib.pyRX�scCs�tt|��}|jr5||jkr5|j|St|�\}}|dkr�| sf|dkr�yC|j|�}|j�}|j�tt |�d�|fSWq�t k r�q�Xn|j ||�}z�|j�} |r�t |d�} n�ddl } t|�\} } t | p#d�\} } t | p;d�\} } t| pSd�\} } tjj| �d}| j|�\}}|jj|�tj|d�} z�|| f}|jdk r�||j|Default error handler: close the connection and raise IOError.s http errorN(RFR3(R6R(RaR�R�R`((s/usr/lib64/python2.7/urllib.pyR��s c CsFddl}d}d}t|t�rit|�\}}|r`t|�\}}t|�}n|}n�|\}}t|�\}}t|�\} } | }d}| j�dkr�d}nIt| �\}} |r�t|�\}}n|r d| || f}n|st d�n|rEt|�}t j |�j �} nd} |rut|�}t j |�j �} nd} |j |dd|jd |jd |j�} |dk r�| jd |�| jd d �| jddt|��n| jd|�| r| jdd| �n| r;| jdd| �n|rT| jd|�nx|jD]}| j|�q^W| j|�| j�\}}}| j�}|dkr�|r�|j�nt d�nd|ko�dknrt||d||�S|dkr&|j|||||�S|j||||||�SdS(sUse HTTPS protocol.i����Nthttpss %s://%s%ss https errors no host giveniR:R;R#R�s Content-Types!application/x-www-form-urlencodedsContent-Lengths%dR�sProxy-AuthorizationsBasic %sR�R�shttp protocol errorsgot a bad status linei�i,shttps:(s https errors no host given(shttp protocol errorisgot a bad status lineN(R�R%R�R�RRRRR�R3R�R�R�tHTTPSR:R;R#R�R�RsR?R�R�R�RFRTR�(R6R(R)R�R�R�ReRfR�RbR�R�R�R�RKR�R�R`Ra((s/usr/lib64/python2.7/urllib.pyt open_https�s~                  cCsut|t�std �n|d dkrd|dd!dkrd|dd!j�dkrd|j|�S|j|�Sd S( s/Use local file or FTP depending on form of URL.s file errors9proxy support for file protocol currently not implementedis//it/i s localhost/N(s file errors9proxy support for file protocol currently not implemented(R�R�R3R�topen_ftpRR(R6R(((s/usr/lib64/python2.7/urllib.pyt open_file�s  < cCsddl}ddl}ddl}yddlm}Wn!tk r[ddlm}nXt|�\}}t|�}ytj |�} Wn.t k r�} t | j | j | j��nX| j} |jj| jdt�} |j|�d} |j|d| p d| | f��}|s�|}|d d krFd |}n#|d d kritd |��ntt|d�||�St|�\}}| r�tj|�t�t�fkr�|}|d d kr�d |}ntt|d�||�St d�dS(sUse local file.i����N(tStringIOtusegmtis6Content-Type: %s Content-Length: %d Last-modified: %s s text/plainiR�sfile://is./sAlocal file url may start with / or file:. Unknown url of type: %sRNslocal file errorsnot on local host(slocal file errorsnot on local host(t mimetypest mimetoolst email.utilst cStringIOR�t ImportErrorRR RAtstatRHR3terrnotstrerrorR,tst_sizetutilst formatdatetst_mtimetTruet guess_typetMessaget ValueErrorRTR'RR[t gethostbynameRR(R6R(R�R�temailR�ReRIt localnametstatsteR}tmodifiedtmtypeR`turlfiletport((s/usr/lib64/python2.7/urllib.pyRR�sD$      !  cCs�t|t�std�nddl}ddl}yddlm}Wn!tk rjddlm}nXt|�\}}|s�td�nt |�\}}t |�\}}|r�t |�\}} nd} t |�}|p�d}| p�d} tj|�}|s%ddl} | j}n t|�}t|�\}} t |�}|jd�} | d | d} } | r�| d  r�| d } n| r�| d  r�d| d R4RGRFR.RLR'RYRXR+R�R�R�t _have_sslR�R�RRR�R�(((s/usr/lib64/python2.7/urllib.pyRxs*      &  A I  I % >cBs�eZdZd�Zd�Zdd�Zd�Zdd�Zdd�Z dd�Z dd�Z dd �Z dd �Z dd �Zdd �Zdd �Zdd�Zd�ZRS(s?Derived class with handlers for errors we can handle (perhaps).cOs2tj|||�i|_d|_d|_dS(Nii (RR4t auth_cachettriestmaxtries(R6RKtkwargs((s/usr/lib64/python2.7/urllib.pyR4ms  cCst||d||�S(s3Default error handling -- don't raise an exception.shttp:(RT(R6R(RaR�R�R`((s/usr/lib64/python2.7/urllib.pyR�ssc Cs�|jd7_z{|jrg|j|jkrgt|d�rH|j}n |j}|||dd|�S|j||||||�}|SWdd|_XdS(s%Error 302 -- relocated (temporarily).ithttp_error_500i�s)Internal Server Error: Redirect RecursionNi(R�R�RWR�R�tredirect_internal( R6R(RaR�R�R`R)tmethR{((s/usr/lib64/python2.7/urllib.pythttp_error_302ws    c Cs�d|kr|d}nd|kr2|d}ndS|j�t|jd||�}|j�}|jd�p�|jd�p�|jd�s�td||d||��n|j|�S( Ntlocationturit:shttp://shttps://sftp://sredirect errors) - Redirection to url '%s' is not allowed(RFRRUR�t startswithR3R'( R6R(RaR�R�R`R)tnewurlt newurl_lower((s/usr/lib64/python2.7/urllib.pyR��s         cCs|j||||||�S(s*Error 301 -- also relocated (permanently).(R�(R6R(RaR�R�R`R)((s/usr/lib64/python2.7/urllib.pythttp_error_301�scCs|j||||||�S(s;Error 303 -- also relocated (essentially identical to 302).(R�(R6R(RaR�R�R`R)((s/usr/lib64/python2.7/urllib.pythttp_error_303�scCsE|dkr(|j||||||�S|j|||||�SdS(s1Error 307 -- relocated, but turn POST into error.N(R%R�R�(R6R(RaR�R�R`R)((s/usr/lib64/python2.7/urllib.pythttp_error_307�s c Cs d|kr+tj||||||�n|d}ddl}|jd|�} | sxtj||||||�n| j�\} } | j�dkr�tj||||||�nd|jd} |dkr�t|| �|| �St|| �|| |�SdS(s_Error 401 -- authentication required. This function supports Basic authentication only.swww-authenticatei����Ns![ ]*([^ ]+)[ ]+realm="([^"]*)"tbasictretry_t _basic_auth( RR�tretmatchtgroupsR�RUR%RZ( R6R(RaR�R�R`R)tstuffR�R�tschemetrealmRg((s/usr/lib64/python2.7/urllib.pythttp_error_401�s"    c Cs d|kr+tj||||||�n|d}ddl}|jd|�} | sxtj||||||�n| j�\} } | j�dkr�tj||||||�nd|jd} |dkr�t|| �|| �St|| �|| |�SdS(seError 407 -- proxy authentication required. This function supports Basic authentication only.sproxy-authenticatei����Ns![ ]*([^ ]+)[ ]+realm="([^"]*)"R�t retry_proxy_R�( RR�R�R�R�R�RUR%RZ( R6R(RaR�R�R`R)RR�R�RRRg((s/usr/lib64/python2.7/urllib.pythttp_error_407�s"    cCs t|�\}}d||}|jd}t|�\}} t| �\} } | jd�d} | | } |j| || �\} } | p�| s�dSt| dd�dt| dd�d| } d| | |jd<|dkr�|j|�S|j||�SdS(Nshttp://R�t@iRMRjR�(RR"Rtfindtget_user_passwdR%RR'(R6R(RR)ReRfR�RcRbRdt proxyselectorR�R�R�((s/usr/lib64/python2.7/urllib.pytretry_proxy_http_basic_auth�s   .  cCs t|�\}}d||}|jd}t|�\}} t| �\} } | jd�d} | | } |j| || �\} } | p�| s�dSt| dd�dt| dd�d| } d| | |jd<|dkr�|j|�S|j||�SdS(Nshttps://R�RiRMRjR�(RR"RRRR%RR'(R6R(RR)ReRfR�RcRbRdR R�R�R�((s/usr/lib64/python2.7/urllib.pytretry_proxy_https_basic_auth�s   .  c Cs�t|�\}}|jd�d}||}|j|||�\}}|pS|sZdSt|dd�dt|dd�d|}d||} |dkr�|j| �S|j| |�SdS(NRiRMRjR�shttp://(RRRR%RR'( R6R(RR)ReRfR�R�R�R�((s/usr/lib64/python2.7/urllib.pytretry_http_basic_auth�s  .  c Cs�t|�\}}|jd�d}||}|j|||�\}}|pS|sZdSt|dd�dt|dd�d|}d||} |dkr�|j| �S|j| |�SdS(NRiRMRjR�shttps://(RRRR%RR'( R6R(RR)ReRfR�R�R�R�((s/usr/lib64/python2.7/urllib.pytretry_https_basic_auth s  .  icCs�|d|j�}||jkrD|r6|j|=qD|j|Sn|j||�\}}|sh|r~||f|j|�Rjt__iter__tnext(RaRrtreadlineRWR;R<R>R?(R6Ra((s/usr/lib64/python2.7/urllib.pyR4�s  cCs d|jjt|�|jfS(Ns<%s at %r whose fp = %r>(t __class__R8tidRa(R6((s/usr/lib64/python2.7/urllib.pyt__repr__�s cCsJd|_d|_d|_d|_|jr=|jj�nd|_dS(N(R%RrR@R;R<RaRF(R6((s/usr/lib64/python2.7/urllib.pyRF�s     (R8R9R�R4RCRF(((s/usr/lib64/python2.7/urllib.pyR:�s  R.cBs eZdZd�Zd�ZRS(s*Class to add a close hook to an open file.cGs&tj||�||_||_dS(N(R:R4t closehookthookargs(R6RaRDRE((s/usr/lib64/python2.7/urllib.pyR4�s cCsPz;|j}|j}|r:d|_d|_||�nWdtj|�XdS(N(RDRER%R:RF(R6RDRE((s/usr/lib64/python2.7/urllib.pyRF�s    (R8R9R�R4RF(((s/usr/lib64/python2.7/urllib.pyR.�s taddinfocBs eZdZd�Zd�ZRS(s.class to add an info() method to an open file.cCstj||�||_dS(N(R:R4R`(R6RaR`((s/usr/lib64/python2.7/urllib.pyR4�scCs|jS(N(R`(R6((s/usr/lib64/python2.7/urllib.pyRk�s(R8R9R�R4Rk(((s/usr/lib64/python2.7/urllib.pyRF�s RTcBs5eZdZdd�Zd�Zd�Zd�ZRS(s9class to add info() and geturl() methods to an open file.cCs/tj||�||_||_||_dS(N(R:R4R`R(tcode(R6RaR`R(RG((s/usr/lib64/python2.7/urllib.pyR4s  cCs|jS(N(R`(R6((s/usr/lib64/python2.7/urllib.pyRkscCs|jS(N(RG(R6((s/usr/lib64/python2.7/urllib.pytgetcode scCs|jS(N(R((R6((s/usr/lib64/python2.7/urllib.pytgeturl sN(R8R9R�R%R4RkRHRI(((s/usr/lib64/python2.7/urllib.pyRT�s    cCsdS(Ni((tx((s/usr/lib64/python2.7/urllib.pyt _is_unicode#scCs t|t�S(N(R�tunicode(RJ((s/usr/lib64/python2.7/urllib.pyRK&scCsTt|�rPy|jd�}WqPtk rLtdt|�d��qPXn|S(stoBytes(u"URL") --> 'URL'.tASCIIsURL s contains non-ASCII characters(RKtencodet UnicodeErrortrepr(R(((s/usr/lib64/python2.7/urllib.pyRS)s  cCsi|j�}|d dkrB|ddkrB|dd!j�}n|d dkre|dj�}n|S(s8unwrap('') --> 'type://host/path'.itisURL:(R�(R(((s/usr/lib64/python2.7/urllib.pyR5s   cCsvtdkr*ddl}|jd�antj|�}|rl|jd�}|j�|t|�dfSd|fS(s:splittype('type:opaquestring') --> 'type', 'opaquestring'.i����Ns ^([^/:]+):i(t _typeprogR%R�tcompileR�tgroupR�Rs(R(R�R�R((s/usr/lib64/python2.7/urllib.pyR>s  cCs�tdkr$tjdtj�antj|�}|r�|jd�}|jd�}|rz|jd� rzd|}n||fSd|fS(s;splithost('//host[:port]/path') --> 'host[:port]', '/path'.s//([^/#?]*)(.*)iiR�N(t _hostprogR%R�RTtDOTALLR�RUR�(R(R�t host_portRm((s/usr/lib64/python2.7/urllib.pyRLs   cCsYtdkr*ddl}|jd�antj|�}|rO|jdd�Sd|fS(sJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.i����Ns ^(.*)@(.*)$ii(t _userprogR%R�RTR�RU(ReR�R�((s/usr/lib64/python2.7/urllib.pyR\s  cCs_tdkr0ddl}|jd|j�antj|�}|rU|jdd�S|dfS(s/splitpasswd('user:passwd') -> 'user', 'passwd'.i����Ns^([^:]*):(.*)$ii(t _passwdprogR%R�RTtSR�RU(R�R�R�((s/usr/lib64/python2.7/urllib.pyRhs  cCsntdkr*ddl}|jd�antj|�}|rd|j�\}}|rd||fSn|dfS(s*splitport('host:port') --> 'host', 'port'.i����Ns^(.*):([0-9]*)$(t _portprogR%R�RTR�R�(ReR�R�R�((s/usr/lib64/python2.7/urllib.pyRus   cCs�tdkr*ddl}|jd�antj|�}|r�|jdd�\}}|r�yt|�}Wntk r�d}nX||fSn||fS(s�Split host and port, returning numeric port. Return given default port if no ':' found; defaults to -1. Return numerical port if a valid number are found after ':'. Return None if ':' but not a valid number.i����Ns ^(.*):(.*)$ii(t _nportprogR%R�RTR�RURqR�(RetdefportR�R�R�tnport((s/usr/lib64/python2.7/urllib.pyR�s     cCsYtdkr*ddl}|jd�antj|�}|rO|jdd�S|dfS(s/splitquery('/path?query') --> '/path', 'query'.i����Ns^(.*)\?([^?]*)$ii(t _queryprogR%R�RTR�RU(R(R�R�((s/usr/lib64/python2.7/urllib.pyR�s  cCsYtdkr*ddl}|jd�antj|�}|rO|jdd�S|dfS(s)splittag('/path#tag') --> '/path', 'tag'.i����Ns^(.*)#([^#]*)$ii(t_tagprogR%R�RTR�RU(R(R�R�((s/usr/lib64/python2.7/urllib.pyR �s  cCs!|jd�}|d|dfS(sksplitattr('/path;attr1=value1;attr2=value2;...') -> '/path', ['attr1=value1', 'attr2=value2', ...].R�ii(R�(R(twords((s/usr/lib64/python2.7/urllib.pyR�scCsYtdkr*ddl}|jd�antj|�}|rO|jdd�S|dfS(s-splitvalue('attr=value') --> 'attr', 'value'.i����Ns^([^=]*)=(.*)$ii(t _valueprogR%R�RTR�RU(R�R�R�((s/usr/lib64/python2.7/urllib.pyR�s  t0123456789ABCDEFabcdefccs?|]5}tD](}||tt||d��fVq qdS(iN(t_hexdigtchrRq(t.0R�tb((s/usr/lib64/python2.7/urllib.pys �ss([-]+)cCsOt|�r�d|kr|Stj|�}|dg}|j}xUtdt|�d�D];}|tt||��jd��|||d�qZWdj |�S|jd�}t|�dkr�|S|dg}|j}x^|dD]R}y$|t |d �||d�Wq�t k r=|d�||�q�Xq�Wdj |�S(s"unquote('abc%20def') -> 'abc def'.t%iiitlatin1Rj( RKt_asciireR�RJtrangeRsRR�tdecodeR�t _hextochrtKeyError(tstbitstresRJR�titem((s/usr/lib64/python2.7/urllib.pyR�s.    #     cCs|jdd�}t|�S(s%unquote('%7e/abc+def') -> '~/abc def't+t (RVR(Rp((s/usr/lib64/python2.7/urllib.pyR �ssAABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-ii�s%{:02X}R�cCs�|s%|dkr!td��n|S|tf}yt|\}}Wnftk r�tj�}|jg|D]}||f^qn�|j}t|}||ft| 'abc%20def' Each part of a URL, e.g. the path info, the query, etc., has a different set of reserved characters that must be quoted. RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists the following reserved characters. reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," Each of these characters is reserved in some component of a URL, but not necessarily in all of them. By default, the quote function is intended for quoting the path section of a URL. Thus, it will not encode '/'. This character is reserved, but in typical usage the quote function is being called on a path where the existing slash characters are used as reserved characters. sNone object cannot be quotedRjN( R%t TypeErrort always_safeR/Rot _safe_maptcopytupdatet __getitem__trstripR�tmap(RpRMtcachekeytquotertsafe_maptc((s/usr/lib64/python2.7/urllib.pyR�s     &  RjcCs<d|kr/t||d�}|jdd�St||�S(s9Quote the query fragment of a URL; replacing ' ' with '+'RuRt(RRV(RpRM((s/usr/lib64/python2.7/urllib.pyRs ic Cs�t|d�r|j�}nby-t|�rJt|dt� rJt�nWn2tk rtj�\}}}td|�nXg}|s�xc|D]E\}}tt |��}tt |��}|j |d|�q�Wnx|D]\}}tt |��}t|t �r7t|�}|j |d|�q�t |�rst|j dd��}|j |d|�q�yt|�Wn8tk r�tt |��}|j |d|�q�Xx/|D]'}|j |dtt |���q�Wq�Wdj |�S(svEncode a sequence of two-element tuples or dictionary into a URL query string. If any values in the query arg are sequences and doseq is true, each sequence element is converted to a separate parameter. If the query arg is a sequence of two-element tuples, the order of the parameters in the output will match the order of parameters in the input. titemsis1not a valid non-string sequence or mapping objectR�RMRVt&(RWR�RsR�ttupleRvR]R^RR�RJRKRNR�( tquerytdoseqttytvattbtlR�R�telt((s/usr/lib64/python2.7/urllib.pyR #s<        )cCs�i}xPtjj�D]?\}}|j�}|r|ddkr|||d proxy server URL mappings. Scan the environment for variables named _proxy; this seems to be the standard convention. In order to prefer lowercase variables, we process the environment in two passes, first matches any and second matches only lower case proxies. If you need a different way, you can pass a proxies dictionary to the [Fancy]URLopener constructor. i����t_proxytREQUEST_METHODR�N(RAtenvironR�R�tpopR%(R"RgR�((s/usr/lib64/python2.7/urllib.pytgetproxies_environmentcs   c Cs�|dkrt�}ny|d}Wntk r:dSX|dkrKdSt|�\}}g|jd�D]}|j�^qm}xs|D]k}|r�|jd�}tj|�}d|}tj ||tj �s�tj ||tj �r�dSq�q�WdS( s�Test if proxies should not be used for a particular host. Checks the proxies dict for the value of no_proxy, which should be a list of comma separated DNS suffixes, or '*' for all hosts. tnoit*iR�t.s (.+\.)?%s$N( R%R�RoRR�R�tlstripR�tescapeR�R�( ReR"tno_proxythostonlyR�Rct no_proxy_listRgtpattern((s/usr/lib64/python2.7/urllib.pytproxy_bypass_environment�s&    (   tdarwin(t_get_proxy_settingst _get_proxiesc Cs�ddl}ddl}ddlm}t|�\}}d�}t�}d|kri|dritSnd}x'|jdd �D]} | s�q�n|jd| �} | dk r�|dkr�y|j |�}||�}Wq�|j k r�q�q�Xn|| j d ��} | j d �} | dkrMd | j d �j d�d } nt | d �} d | } || ?| | ?kr�tSq�||| �r�tSq�WtS(s� Return True iff this host shouldn't be accessed using a proxy This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. i����N(tfnmatchcSsy|jd�}tt|�}t|�dkrM|ddddgd }n|dd>|dd>B|dd>B|d BS( NR�iiiiiiii(R�R}RqRs(tipAddrtparts((s/usr/lib64/python2.7/urllib.pytip2num�s R�texclude_simplet exceptionss(\d+(?:\.\d+)*)(/\d+)?iiii ((R�R[R�RR�R�R%R=R�R�R\RUtcountRqR7( ReR�R[R�R�R�R�tproxy_settingsthostIPR�tmtbasetmask((s/usr/lib64/python2.7/urllib.pytproxy_bypass_macosx_sysconf�s@          # cCst�S(s�Return a dictionary of scheme -> proxy server URL mappings. This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. (R�(((s/usr/lib64/python2.7/urllib.pytgetproxies_macosx_sysconf�scCs*t�}|rt||�St|�SdS(s�Return True, if a host should be bypassed. Checks proxy settings gathered from the environment, if specified, or from the MacOSX framework SystemConfiguration. N(R�R�R�(ReR"((s/usr/lib64/python2.7/urllib.pyR��s  cCst�pt�S(N(R�R�(((s/usr/lib64/python2.7/urllib.pyR�sc Csmi}yddl}Wntk r*|SXy!|j|jd�}|j|d�d}|rAt|j|d�d�}d|kr�x�|jd�D]Y}|jdd �\}}ddl}|jd |�s�d ||f}n||| proxy server URL mappings. Win32 uses the registry to store proxies. i����Ns;Software\Microsoft\Windows\CurrentVersion\Internet Settingst ProxyEnableit ProxyServerR�R�is ^([^/:]+)://s%s://%sishttp:R�s http://%ss https://%sR�sftp://%sR"( t_winregR�tOpenKeytHKEY_CURRENT_USERt QueryValueExR�R�R�R�tCloset WindowsErrorR�Rv( R"R�tinternetSettingst proxyEnablet proxyServertptprotocoltaddressR�((s/usr/lib64/python2.7/urllib.pytgetproxies_registry�s:         cCst�pt�S(s�Return a dictionary of scheme -> proxy server URL mappings. Returns settings gathered from the environment, if specified, or the registry. (R�R�(((s/usr/lib64/python2.7/urllib.pyR+sc Cs�yddl}ddl}Wntk r0dSXyK|j|jd�}|j|d�d}t|j|d�d�}Wntk r�dSX| s�| r�dSt|�\}}|g}y/t j |�}||kr�|j |�nWnt j k rnXy/t j |�} | |kr2|j | �nWnt j k rInX|jd�}x�|D]�} | dkr�d|kr�d Sn| jdd �} | jd d �} | jd d�} x*|D]"} |j| | |j�r�d Sq�Wq`WdS(Ni����is;Software\Microsoft\Windows\CurrentVersion\Internet SettingsR�t ProxyOverrideR�sR�is\.R�s.*t?(R�R�R�R�R�R�R�R�RR[R�RJR\tgetfqdnR�RVR�R�( ReR�R�R�R�t proxyOverridetrawHostR�taddrtfqdnttesttval((s/usr/lib64/python2.7/urllib.pytproxy_bypass_registry4sT                cCs*t�}|rt||�St|�SdS(s�Return True, if the host should be bypassed. Checks proxy settings gathered from the environment, if specified, or the registry. N(R�R�R�(ReR"((s/usr/lib64/python2.7/urllib.pyR�hs  cCs�d}x$td�D]}|t|�}qW|d}tj�}t|�}t|�}tj�}||kr{dGHnt|�GHt|�GHt|�GHt||d�GdGHdS(NRjiisWrong!itsec(RlRfR�RRRPtround(RpR�tt0tqstuqstt1((s/usr/lib64/python2.7/urllib.pyttest1zs         cCsd|||fGHdS(Ns0Block number: %d, Block size: %d, Total size: %d((R~t blocksizet totalsize((s/usr/lib64/python2.7/urllib.pyR-�s(hR�tstringR[RAR�R]R�R�turlparseRRt__all__R�R�Rgt nturl2pathR R t rourl2pathR%R&RRRtsslR7R�R�R3R2R1RRRRRRRRRRR�R:R.RFRTRLt NameErrorRKRSRRSRRVRRYRRZRR\RR]RR`RRaR RRcRRetdictRnRTRkRR RwRxtziptxrangeR�t bytearrayR�R�tformatR/RRR R�R�tplatformt_scproxyR�R�R�R�R�RR�R�R�R-(((s/usr/lib64/python2.7/urllib.pyts�               ���    c "                 45 '  @ $  ;   . 4