ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
Yc           @@ s   d  Z  d d l m Z m Z d d l Z d d l m Z m Z m Z m	 Z	 m
 Z
 d   Z d e d d  Z d	   Z d
   Z d   Z d S(   u   
raven.utils.encoding
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
i    (   t   absolute_importt   unicode_literalsN(   t   integer_typest	   text_typet   binary_typet   string_typest   PY2c      	   C@ sJ   d d l  } d d l } t |  t t d  t | | j | j | j f  S(   u   Determine if the object instance is of a protected type.

    Objects of protected types are preserved as-is when passed to
    force_text(strings_only=True).
    i    N(	   t   Decimalt   datetimet
   isinstanceR   t   typet   Nonet   floatt   datet   time(   t   objR   R   (    (    sE   /opt/alt/python27/lib/python2.7/site-packages/raven/utils/encoding.pyt   is_protected_type   s    u   utf-8u   strictc         C@ s,  t  |  t  r |  S| r) t |   r) |  Sy t  |  t  s t |  d  rY |  j   }  q t s t  |  t  r t |  | |  }  q t |   }  q t t |   | |  }  n |  j | |  }  Wne t	 k
 r'} t  |  t
  s t	 | j    q(d j g  |  D] } t | | | |  ^ q  }  n X|  S(   u   
    Similar to smart_text, except that lazy instances are resolved to
    strings, rather than kept as lazy objects.

    If strings_only is True, don't convert (some) non-string-like objects.
    u   __unicode__u    (   R	   R   R   R   t   hasattrt   __unicode__R   t   bytest   decodet   UnicodeDecodeErrort	   Exceptiont   argst   joint
   force_text(   t   st   encodingt   strings_onlyt   errorst   et   arg(    (    sE   /opt/alt/python27/lib/python2.7/site-packages/raven/utils/encoding.pyR      s(    		,c         C@ s*   d d l  m } t j d t  | |   S(   Ni    (   t	   transformu5   You should switch to raven.utils.serializer.transform(   t   raven.utils.serializerR    t   warningst   warnt   DeprecationWarning(   t   valueR    (    (    sE   /opt/alt/python27/lib/python2.7/site-packages/raven/utils/encoding.pyR    H   s    	c         C@ s   y t  t |    }  Wni t t f k
 r5 d }  nM t k
 r y" t  t t t |      }  Wq t k
 r} d }  q Xn X|  S(   Nu   (Error decoding value)(   R   R   t   UnicodeEncodeErrorR   R   t   reprR
   (   R%   (    (    sE   /opt/alt/python27/lib/python2.7/site-packages/raven/utils/encoding.pyt
   to_unicodeP   s    	"c         C@ sH   y  t  |  j d  j d   SWn! t k
 rC t |   j d  SXd  S(   Nu   utf-8(   R   R   t   encodeR   R(   (   R%   (    (    sE   /opt/alt/python27/lib/python2.7/site-packages/raven/utils/encoding.pyt	   to_string]   s     (   t   __doc__t
   __future__R    R   R"   t   raven.utils.compatR   R   R   R   R   R   t   FalseR   R    R(   R*   (    (    (    sE   /opt/alt/python27/lib/python2.7/site-packages/raven/utils/encoding.pyt   <module>   s   (	,		