File: //proc/self/root/usr/lib/python2.7/site-packages/rhn/connections.pyc
�
���[c           @   s,  d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l	 m
 Z
 d  d l m Z m Z m
 Z
 d e j f d �  �  YZ d e j f d �  �  YZ d e f d	 �  �  YZ d
 e f d �  �  YZ d e f d
 �  �  YZ d e f d �  �  YZ d �  Z d �  Z d S(   i����N(   t   python_version(   t   _CS_REQ_SENTt   _CS_IDLEt   ResponseNotReadyt   HTTPResponsec           B   s   e  Z d  �  Z RS(   c         C   sM   t  |  j t j � s- t j |  j � |  _ n  |  j j | | | | | � d  S(   N(   t
   isinstancet   fpt   nonblockingt   NonBlockingFilet   set_callback(   t   selft   rst   wst   ext	   user_datat   callback(    (    s3   /usr/lib/python2.7/site-packages/rhn/connections.pyR	      s    (   t   __name__t
   __module__R	   (    (    (    s3   /usr/lib/python2.7/site-packages/rhn/connections.pyR      s   t   HTTPConnectionc           B   sD   e  Z e Z d e j d  � Z d �  Z d �  Z	 d �  Z
 d �  Z RS(   c         C   s�   t  �  d k r. t j j |  | | d | �n t j j |  | | � g  |  _ g  |  _ g  |  _ d  |  _ d  |  _	 d |  _
 | |  _ d  S(   Ns   2.6.1t   timeouts#   rhn.connections $Revision$ (python)(   R    t   httplibR   t   __init__t   _cb_rst   _cb_wst   _cb_ext   Nonet
   _cb_user_datat   _cb_callbackt   _user_agentR   (   R
   t   hostt   portR   (    (    s3   /usr/lib/python2.7/site-packages/rhn/connections.pyR       s    						c         C   s1   | |  _  | |  _ | |  _ | |  _ | |  _ d  S(   N(   R   R   R   R   R   (   R
   R   R   R
   R   R   (    (    s3   /usr/lib/python2.7/site-packages/rhn/connections.pyR	   -   s
    				c         C   s
   | |  _  d  S(   N(   R   (   R
   t
   user_agent(    (    s3   /usr/lib/python2.7/site-packages/rhn/connections.pyt   set_user_agent5   s    c         C   s  |  j  r$ |  j  j �  r$ d |  _  n  |  j t k s<