관리-도구
편집 파일: base.pyc
� ��Yc @@ s d Z d d l m Z d d l Z d d l Z d d l m Z m Z m Z m Z m Z m Z m Z d d l m Z d d l m Z d Z d � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ d e f d � � YZ e r�d e f d � � YZ n e j e � e j e � e j e � e j e � e j e � e j e � e j e � e j e � e j e � e re j e � n d S( s� raven.utils.serializer.base ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. i ( t absolute_importN( t text_typet binary_typet string_typest iteritemst class_typest PY2t PY3( t to_unicodei ( t managert Serializerc C@ s0 y t | j d � � SWn t k r+ t SXd S( Nt __sentry__( t callablet __getattribute__t Exceptiont False( t value( ( sL /opt/alt/python27/lib/python2.7/site-packages/raven/utils/serializer/base.pyt has_sentry_metadata s c B@ s8 e Z d Z d � Z d � Z d � Z d d d � Z RS( c C@ s | | _ d S( N( R ( t selfR ( ( sL /opt/alt/python27/lib/python2.7/site-packages/raven/utils/serializer/base.pyt __init__ s c C@ s t | | j � S( s| Given ``value``, return a boolean describing whether this serializer can operate on the given type ( t isinstancet types( R R ( ( sL /opt/alt/python27/lib/python2.7/site-packages/raven/utils/serializer/base.pyt can# s c K@ s | S( s@ Given ``value``, coerce into a JSON-safe type. ( ( R R t kwargs( ( sL /opt/alt/python27/lib/python2.7/site-packages/raven/utils/serializer/base.pyt serialize* s i i c K@ s� | j d d � } | d 7} | | k r� y t t | � � | } Wq� t k r� } d d l } | j � | j j j | � t t | � � SXn | j j | d | d | | �S( s| Given ``value``, recurse (using the parent serializer) to handle coercing of newly defined values. t string_max_lengthi i Nt max_deptht _depth( t gett NoneR t reprR t tracebackt print_excR t loggert exceptiont typet transform( R R R R R R t eR ( ( sL /opt/alt/python27/lib/python2.7/site-packages/raven/utils/serializer/base.pyt recurse0 s ( ( t __name__t __module__R R R R R&