ó
è?F[c           @   s*   d  d l  m Z d e f d „  ƒ  YZ d S(   iÿÿÿÿ(   t   jsont   GlacierResponsec           B   s#   e  Z d  Z d „  Z d d „ Z RS(   sª   
    Represents a response from Glacier layer1. It acts as a dictionary
    containing the combined keys received via JSON in the body (if
    supplied) and headers.
    c         C   sÞ   | |  _  | j |  _ | j d ƒ |  d <| r[ x* | D] \ } } | j | ƒ |  | <q5 Wn  | j d k r° | j d ƒ d k r° t j | j ƒ  j d ƒ ƒ } |  j | ƒ q° n  | j d d  ƒ } | d  k	 rÚ | |  _	 n  d  S(   Ns   x-amzn-requestidu	   RequestIdiÌ   s   Content-Types   application/jsons   utf-8s   Content-Length(
   t   http_responset   statust	   getheaderR    t   loadst   readt   decodet   updatet   Nonet   size(   t   selfR   t   response_headerst   header_namet	   item_namet   bodyR
   (    (    s4   lib/python2.7/site-packages/boto/glacier/response.pyt   __init__    s    	c         C   s   |  j  j | ƒ S(   sA   Reads and returns the response body, or up to the next amt bytes.(   R   R   (   R   t   amt(    (    s4   lib/python2.7/site-packages/boto/glacier/response.pyR   /   s    N(   t   __name__t
   __module__t   __doc__R   R	   R   (    (    (    s4   lib/python2.7/site-packages/boto/glacier/response.pyR      s   	N(   t   boto.compatR    t   dictR   (    (    (    s4   lib/python2.7/site-packages/boto/glacier/response.pyt   <module>   s   