ó
(;^c           @   sb   d  d l  m Z d  d l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d S(	   iÿÿÿÿ(   t   handlerNt   Tagc           B   s;   e  Z d d d  „ Z d „  Z d „  Z d „  Z d „  Z RS(   c         C   s   | |  _  | |  _ d  S(   N(   t   keyt   value(   t   selfR   R   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   __init__   s    	c         C   s   d  S(   N(   t   None(   R   t   namet   attrst
   connection(    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   startElement
   s    c         C   s4   | d k r | |  _  n | d k r0 | |  _ n  d  S(   Nt   Keyt   Value(   R   R   (   R   R   R   R	   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt
   endElement   s    c         C   s   d |  j  |  j f S(   Ns)   <Tag><Key>%s</Key><Value>%s</Value></Tag>(   R   R   (   R   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   to_xml   s    c         C   s"   |  j  | j  k o! |  j | j k S(   N(   R   R   (   R   t   other(    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   __eq__   s    N(   t   __name__t
   __module__R   R   R
   R   R   R   (    (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR      s
   			t   TagSetc           B   s,   e  Z d  „  Z d „  Z d „  Z d „  Z RS(   c         C   s*   | d k r& t  ƒ  } |  j | ƒ | Sd  S(   NR   (   R   t   appendR   (   R   R   R   R	   t   tag(    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR
      s
    	c         C   s   t  |  | | ƒ d  S(   N(   t   setattr(   R   R   R   R	   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR   #   s    c         C   s    t  | | ƒ } |  j | ƒ d  S(   N(   R   R   (   R   R   R   R   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   add_tag&   s    c         C   s5   d } x |  D] } | | j  ƒ  7} q W| d 7} | S(   Ns   <TagSet>s	   </TagSet>(   R   (   R   t   xmlR   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR   *   s
    
(   R   R   R
   R   R   R   (    (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR      s   			t   Tagsc           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s2   A container for the tags associated with a bucket.c         C   s*   | d k r& t  ƒ  } |  j | ƒ | Sd  S(   NR   (   R   R   R   (   R   R   R   R	   t   tag_set(    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR
   5   s
    	c         C   s   t  |  | | ƒ d  S(   N(   R   (   R   R   R   R	   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR   <   s    c         C   s5   d } x |  D] } | | j  ƒ  7} q W| d 7} | S(   Ns	   <Tagging>s
   </Tagging>(   R   (   R   R   R   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR   ?   s
    
c         C   s   |  j  | ƒ d  S(   N(   R   (   R   R   (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   add_tag_setF   s    (   R   R   t   __doc__R
   R   R   R   (    (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyR   2   s
   			(	   t   botoR    t   xml.saxR   t   objectR   t   listR   R   (    (    (    s1   /tmp/pip-unpacked-wheel-qigtnF/boto/s3/tagging.pyt   <module>   s   