ó
ú2ec           @  s  d  Z  d d l m 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
 Z
 d d l Z d d l Z d d l Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z d d	 l m Z d d
 l m Z d d l m Z d d l m Z d d l m Z d Z d „  Z e d „ Z  d „  Z! d „  Z" d „  Z# d „  Z$ e j% e& e j ƒ  ƒ ƒ Z' d „  Z( d e) f d „  ƒ  YZ* d e) f d „  ƒ  YZ+ d e j, f d „  ƒ  YZ- d „  Z. d „  Z/ d „  Z0 d „  Z1 d  Z2 d d! „ Z4 d S("   sâ  
Exception-catching middleware that allows interactive debugging.

This middleware catches all unexpected exceptions.  A normal
traceback, like produced by
``paste.exceptions.errormiddleware.ErrorMiddleware`` is given, plus
controls to see local variables and evaluate expressions in a local
context.

This can only be used in single-process environments, because
subsequent requests must go back to the same process that the
exception originally occurred in.  Threaded or non-concurrent
environments both work.

This shouldn't be used in production in any way.  That would just be
silly.

If calling from an XMLHttpRequest call, if the GET variable ``_`` is
given then it will make the response more compact (and less
Javascripty), since if you use innerHTML it'll kill your browser.  You
can look for the header X-Debug-URL in your 500 responses if you want
to see the full debuggable traceback.  Also, this URL is printed to
``wsgi.errors``, so you can open it up in another browser window.
iÿÿÿÿ(   t   print_functionN(   t	   cStringIO(   t   errormiddlewaret	   formattert	   collector(   t   wsgilib(   t	   urlparser(   t   httpexceptions(   t   registry(   t   request(   t   response(   t   evalcontext(   t   htmliÈ   c         C  s&   |  d k r d St j t |  ƒ d ƒ S(   s;   
    Escape HTML characters, plus translate None to ''
    t    i   N(   t   NoneR   t   escapet   str(   t   v(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt
   html_quote3   s    c         C  sn   | r t  |  ƒ }  n  |  j d d ƒ }  t j d t |  ƒ }  t j d t |  ƒ }  t j d t |  ƒ }  d |  S(   sÊ   
    Quote a value for HTML, preserving whitespace (translating
    newlines to ``<br>`` and multiple spaces to use ``&nbsp;``).

    If ``quote`` is true, then the value will be HTML quoted first.
    s   
s   <br>
s   ()(  +)s   (\n)( +)s   ^()( +)s   <code>%s</code>(   R   t   replacet   ret   subt
   _repl_nbsp(   R   t   quote(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   preserve_whitespace;   s    c         C  sK   t  |  j d ƒ ƒ d k r d S|  j d ƒ d t  |  j d ƒ ƒ d d S(   Ni   i   s   &nbsp;t    (   t   lent   group(   t   match(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR   J   s    c           s   ‡  f d †  } | S(   s\   
    A simple middleware that catches errors and turns them into simple
    tracebacks.
    c           sk   y ˆ  |  | ƒ SWnS t  ƒ  } t j d | ƒ | d d g t j ƒ  ƒ | j ƒ  } d t | ƒ g SXd  S(   Nt   files   500 Server Errors   content-types	   text/htmls   <h3>Error</h3><pre>%s</pre>(   s   content-types	   text/html(   t   StringIOt	   tracebackt	   print_exct   syst   exc_infot   getvalueR   (   t   environt   start_responset   outt   res(   t   application(    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   simplecatcher_appT   s    	(    (   R(   R)   (    (   R(   sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   simplecatcherO   s    c          C  s   d „  }  |  S(   s=   
    Turns a function or method into a WSGI application.
    c           s   ‡  f d †  } t  | _ | S(   Nc            s‚   t  ˆ  ƒ d k r6 ˆ  d } ˆ  d } ˆ  d g ‰  n ˆ  \ } } g  ‰  ‡  ‡ f d †  } t j | ƒ } t | ƒ } | | | ƒ S(   Ni   i   i   i    c           s„   t  j |  d t ƒ} t j i d d 6d d 6ƒ } |  | d <| | d <ˆ ˆ  | j ƒ  Ž  } | j d ƒ } | | | j ƒ  ƒ | g S(   Nt   include_get_varss	   text/htmls   content-types   200 OKt   statusR$   t   headers(   R   t   parse_formvarst   TrueR
   t
   HeaderDictt   mixedt   popt   headeritems(   R$   R%   t   formR-   R'   R,   (   t   argst   func(    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR(   q   s    	


(   R   R   t   make_middlewareR*   (   R5   R$   R%   R(   t   app(   R6   (   R5   sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   wsgiapp_wrapperg   s    

(   R/   t   exposed(   R6   R9   (    (   R6   sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt	   decoratorf   s    	(    (   R;   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   wsgiappb   s    	c           s   ‡  f d †  } | S(   s²   
    A decorator (meant to be used under ``wsgiapp()``) that resolves
    the ``debugcount`` variable to a ``DebugInfo`` object (or gives an
    error if it can't be found).
    c           sÓ   y  d | k r t  d ƒ ‚ n  | j d ƒ } y t | ƒ } Wn t  k
 r\ t  d ƒ ‚ n X| |  j k r t  d | ƒ ‚ n  |  j | } ˆ  |  d | | SWn, t  k
 rÎ } d | d d <d	 t | ƒ SXd  S(
   Nt
   debugcounts'   You must provide a debugcount parameters   Bad value for debugcounts0   Debug %s no longer found (maybe it has expired?)t
   debug_infos   500 Server ErrorR-   R,   s#   <html>There was an error: %s</html>(   t
   ValueErrorR2   t   intt   debug_infosR   (   t   selfR4   R=   R>   t   e(   R6   (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   debug_info_replacementŠ   s"    (    (   R6   RD   (    (   R6   sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   get_debug_info„   s    c         C  s3   d |  k r |  d St  j t ƒ |  d <} | Sd S(   s?   
    Return the unique debug count for the current request
    s   paste.evalexception.debug_countN(   t   sixt   nextt   debug_counter(   R$   RG   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   get_debug_countŸ   s    t   EvalExceptionc           B  sÈ   e  Z d d d  „ Z d „  Z d „  Z d „  Z e e _ d „  Z	 e e	 _ d „  Z
 e e
 _ d „  Z e e _ d „  Z d „  Z e ƒ  e e ƒ ƒ Z d	 „  Z e ƒ  e e ƒ ƒ Z d
 „  Z d „  Z RS(   c         C  sU   | |  _  i  |  _ | d  k rH | d  k r3 d } qH | j d d ƒ } n  | |  _ d  S(   Nt   _t   xmlhttp_key(   R(   RA   R   t   getRL   (   RB   R(   t   global_confRL   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   __init__«   s    			c         C  s`   | d s t  d ƒ ‚ |  | d <| j d d ƒ j d ƒ rL |  j | | ƒ S|  j | | ƒ Sd  S(   Ns   wsgi.multiprocesssI   The EvalException middleware is not usable in a multi-process environments   paste.evalexceptiont	   PATH_INFOR   s   /_debug/(   t   AssertionErrorRM   t
   startswitht   debugt   respond(   RB   R$   R%   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   __call__¶   s    	
c         C  s¶   t  j | ƒ d k s t ‚ t  j | ƒ } t |  | d  ƒ } | st t j d | t j | ƒ f ƒ } | j	 | | ƒ St | d t
 ƒ s© t j d | ƒ } | j	 | | ƒ S| | | ƒ S(   Nt   _debugs   %r not found when parsing %rR:   s   %r not allowed(   R	   t   path_info_popRQ   t   getattrR   R   t   HTTPNotFoundR   t   construct_urlt   wsgi_applicationt   Falset   HTTPForbidden(   RB   R$   R%   t	   next_partt   methodt   exc(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRS   À   s    c         C  s7   t  j t j j t j j t ƒ d ƒ ƒ } | | | ƒ S(   s?   
        Static path where images and other files live
        t   media(   R   t   StaticURLParsert   ost   patht   joint   dirnamet   __file__(   RB   R$   R%   R8   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRa   Ï   s    $c         C  s7   t  j t j j t j j t ƒ d ƒ ƒ } | | | ƒ S(   s2   
        Static path where MochiKit lives
        t   mochikit(   R   Rb   Rc   Rd   Re   Rf   Rg   (   RB   R$   R%   R8   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRh   Ø   s    $c         C  sa   | d d g ƒ g  } |  j  j ƒ  } | j d „  ƒ g  | D] } | j ƒ  ^ q< } t | ƒ g S(   s[   
        Returns a JSON-format summary of all the cached
        exception reports
        s   200 OKs   Content-types   text/x-jsonc         S  s   t  |  j | j ƒ S(   N(   t   cmpt   created(   t   at   b(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   <lambda>é   R   (   s   Content-types   text/x-json(   RA   t   valuest   sortt   jsont   repr(   RB   R$   R%   t   datat   itemst   item(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   summaryá   s    c         C  s\   t  t j | ƒ ƒ } | |  j k r? | d d g ƒ d | g S|  j | } | j | | ƒ S(   s,   
        View old exception reports
        s   500 Server Errors   Content-types	   text/htmlsH   Traceback by id %s does not exist (maybe the server has been restarted?)(   s   Content-types	   text/html(   R@   R	   RW   RA   R[   (   RB   R$   R%   t   idR>   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   viewî   s    
c         C  s   | d | S(   Ns   /_debug/view/%s(    (   RB   R$   t	   base_patht   count(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   make_view_urlÿ   s    c         K  sm   | j  t | ƒ ƒ } | j j } | rV t j j | j ƒ t | ƒ } t j j	 ƒ  n d } t
 | | ƒ | S(   Ns   No local vars(   t   frameR@   t   tb_framet   f_localsR   t   restorert   restoration_begint   countert
   make_tablet   restoration_endt
   input_form(   RB   t   tbidR>   t   kwR{   t   varst
   local_vars(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt
   show_frame  s    c         K  s½   | j  ƒ  s d S| j ƒ  d } | j t | ƒ ƒ } | j j } | j j } t j | | ƒ } t	 j
 j | j ƒ | j | ƒ }	 t	 j
 j ƒ  t j | ƒ }
 d t |
 d t ƒt |	 ƒ f S(   NR   s   
sD   <code style="color: #060">&gt;&gt;&gt;</code> <code>%s</code><br>
%sR   (   t   stript   rstripR{   R@   R|   R}   t	   f_globalsR   t   EvalContextR   R~   R   R€   t	   exec_exprR‚   R   t   str2htmlR   R\   (   RB   R„   R>   t   inputR…   R{   R†   t	   glob_varst   contextt   outputt
   input_html(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt
   exec_input  s    c           sI  | j  d ƒ r |  j | ˆ  ƒ St j | d t d t ƒ} t | d <g  ‰ d  ‡  ‡ f d † } y\ t j |  | f } |  j | | ƒ } z t	 | ƒ } | SWd  t
 | d ƒ r¹ | j ƒ  n  XWn‡t j ƒ  } x3 | j  d g  ƒ D] }	 t | d |	 ƒ rà ‚  qà qà Wt j j | ƒ t | ƒ }
 |  j | | |
 ƒ } ˆ sid g } | j d
 | f ƒ ˆ  d | | ƒ n  d | } | d j | ƒ t j | Œ  } t |
 | | | | | ƒ } |
 |  j k sÃt ‚ | |  j |
 <|  j r:t j | ƒ } t | ƒ j  |  j ƒ r:t j | Œ  } t j | d t d t d t ƒ} | g Sn  | j  ƒ  SXd  S(   Ns   paste.throw_errorst   with_path_infot   with_query_stringc           s2   y ˆ  |  | | ƒ SWn
 ‚  n Xˆ j  t ƒ d  S(   N(   t   appendR/   (   R,   R-   R"   (   R%   t   started(    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   detect_start_response-  s
    t   closes   paste.expected_exceptionsi   s   content-types	   text/htmls   X-Debug-URLs   500 Internal Server Errors   Debug at: %s
s   wsgi.errorst   include_hidden_framest   include_reusablet   show_extra_data(   s   content-types	   text/html(!   RM   R(   R	   RZ   R\   R/   R   R   t
   Supplementt   listt   hasattrRš   R!   R"   t
   isinstanceR   R~   t   save_registry_stateRI   Rz   R—   t   writeR   t   collect_exceptiont	   DebugInfoRA   RQ   RL   t   parse_querystringt   dictR   t   format_htmlt   content(   RB   R$   R%   Rx   R™   t   __traceback_supplement__t   app_itert   return_iterR"   t   expectedRy   t   view_uriR-   t   msgt   exc_dataR>   t   get_varsR   (    (   R%   R˜   sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRT   &  sZ    	

	

	
c      	   C  sh   t  } |  j rB t j | ƒ } t | ƒ j |  j ƒ rB t } qB n  t j | | d d t d t d | ƒS(   Ns   wsgi.errorsR   t
   debug_modet   simple_html_error(	   R\   RL   R	   R¦   R§   RM   R/   R   t   handle_exception(   RB   R"   R$   R³   R±   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   exception_handlerd  s    	N(   t   __name__t
   __module__R   RO   RU   RS   Ra   R/   R:   Rh   Ru   Rw   Rz   Rˆ   R<   RE   R”   RT   Rµ   (    (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRJ   ©   s&   
	
													>R¥   c           B  s>   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   c   
      C  sÝ   | |  _  | |  _ | |  _ | |  _ | |  _ t j ƒ  |  _ | \ |  _ |  _ |  _	 d } g  |  _
 d } |  j	 }	 xd |	 d  k	 rØ t d  k s™ | t k  rØ |	 j j j d ƒ r² Pn  |  j
 j |	 ƒ |	 j }	 | d 7} qu Wd  S(   Ni   i    t   __exception_formatter__(   R€   R°   Rx   R$   R®   t   timeRj   t   exc_typet	   exc_valuet   tbt   framesR   t   limitR|   R}   RM   R—   t   tb_next(
   RB   R€   R"   R°   Rx   R$   R®   R¸   t   nR¼   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRO   r  s"    							'	c         C  sW   i |  j  d 6t j d t j |  j ƒ ƒ d 6|  j d 6t |  j ƒ d 6t |  j ƒ d 6S(   s2   Return the JSON-able representation of this objectt   uris   %cRj   t   created_timestampt   exception_typet	   exception(   R®   R¹   t   strftimet   gmtimeRj   R   Rº   R»   (   RB   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRp   ‡  s    

c         C  sG   x@ |  j  D] } t | ƒ | k r
 | Sq
 Wt d | |  j  f ƒ ‚ d  S(   Ns   No frame by id %s found from %r(   R½   Rv   R?   (   RB   R„   R{   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR{   ‘  s    c         C  s   | d d g ƒ |  j  ƒ  S(   Ns   200 OKs   content-types	   text/html(   s   content-types	   text/html(   R©   (   RB   R$   R%   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR[   ˜  s    c         C  s‘   t  |  j |  j |  j ƒ } t j t j } | |  j ƒ  7} t |  j	 ƒ } t
 i | pY d d 6| d 6| d 6} t j rŠ | j d ƒ } n  | g S(   NR   t   repost_buttont	   head_htmlt   bodyt   utf8(   t   format_eval_htmlR°   Rx   R€   R   t	   error_csst   hide_display_jst   eval_javascriptt   make_repost_buttonR$   t   error_templateRF   t   PY3t   encode(   RB   R   RÈ   RÇ   t   page(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR©   œ  s    	c         C  s$   |  j  d } d | | | |  j f S(   Ns   /_debugsÙ   <script type="text/javascript" src="%s/media/MochiKit.packed.js"></script>
<script type="text/javascript" src="%s/media/debug.js"></script>
<script type="text/javascript">
debug_base = %r;
debug_count = %r;
</script>
(   Rx   R€   (   RB   Rx   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRÎ   ©  s    (   R¶   R·   RO   Rp   R{   R[   R©   RÎ   (    (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR¥   p  s   		
			t   EvalHTMLFormatterc           B  s   e  Z d  „  Z d „  Z RS(   c         K  s,   t  t |  ƒ j |   | |  _ | |  _ d  S(   N(   t   superRÔ   RO   Rx   R€   (   RB   Rx   R€   R…   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRO   ¸  s    	c         C  s0   t  j j |  | | ƒ } | d | j |  j f S(   Ns­     <a href="#" class="switch_source" tbid="%s" onClick="return showFrame(this)">&nbsp; &nbsp; <img src="%s/_debug/media/plus.jpg" border=0 width=9 height=9> &nbsp; &nbsp;</a>(   R   t   HTMLFormattert   format_source_lineR„   Rx   (   RB   t   filenameR{   t   line(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR×   ½  s
    	(   R¶   R·   RO   R×   (    (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRÔ   ¶  s   	c   	   	   C  sP  t  |  t ƒ r$ t |  j ƒ  ƒ }  n  g  } d } x|  D]\ } } | d 7} t ƒ  } y t j | | ƒ Wn' t k
 r“ } t d | d | ƒn Xt | j	 ƒ  ƒ } t
 | ƒ d k rç | } | d  } | d 7} | d | d 7} n  t j | ƒ } | d r	d	 } n d
 } | j d | t | ƒ t | d t ƒf ƒ q7 Wd d j | ƒ S(   Ni    i   s	   Error: %sR   id   sj   <a class="switch_source" style="background-color: #999" href="#" onclick="return expandLong(this)">...</a>s%   <span style="display: none">%s</span>i   s    class="even"s    class="odd"s[   <tr%s style="vertical-align: top;"><td><b>%s</b></td><td style="overflow: auto">%s<td></tr>R   s   <table>%s</table>s   
(   R¡   R§   t   sortedRs   R   t   pprintt	   Exceptiont   printR   R#   R   R   t   make_wrappableR—   R   R\   Re   (	   Rs   t   rowst   it   namet   valueR&   RC   t
   orig_valuet   attr(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyR   Ç  s4    
	


		c   	      C  sÆ   t  d | d | d t ƒ } | j |  ƒ } t  d | d | d t d t d t ƒ } | j |  ƒ } t j |  d t ƒ} | j |  j ƒ | j |  j ƒ k r¦ d | } n d } d | | t j	 | ƒ f S(	   NRx   R€   Rœ   t   show_hidden_framesR   s¼   
    <br>
    <script type="text/javascript">
    show_button('full_traceback', 'full traceback')
    </script>
    <div id="full_traceback" class="hidden-data">
    %s
    </div>
        R   sú   
    %s
    %s
    <br>
    <script type="text/javascript">
    show_button('text_version', 'text version')
    </script>
    <div id="text_version" class="hidden-data">
    <textarea style="width: 100%%" rows=10 cols=60>%s</textarea>
    </div>
    (
   RÔ   R\   t   format_collected_dataR/   R   t   format_textt   filter_framesR½   R   R   (	   R°   Rx   R€   t   short_formattert   short_ert   long_formattert   long_ert   text_ert   full_traceback_html(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRË   ç  s$    		c         C  s/   t  j |  ƒ } |  d d k r' d | Sd  Sd  S(   Nt   REQUEST_METHODt   GETsB   <button onclick="window.location.href=%r">Re-GET Page</button><br>(   R	   RZ   R   (   R$   t   url(    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRÏ     s    c         C  s   d i |  d 6S(   Ns~  
<form action="#" method="POST"
 onsubmit="return submitInput($('submit_%(tbid)s'), %(tbid)s)">
<div id="exec-output-%(tbid)s" style="width: 95%%;
 padding: 5px; margin: 5px; border: 2px solid #000;
 display: none"></div>
<input type="text" name="input" id="debug_input_%(tbid)s"
 style="width: 100%%"
 autocomplete="off" onkeypress="upArrow(this, event)"><br>
<input type="submit" value="Execute" name="submitbutton"
 onclick="return submitInput(this, %(tbid)s)"
 id="submit_%(tbid)s"
 input-from="debug_input_%(tbid)s"
 output-to="exec-output-%(tbid)s">
<input type="submit" value="Expand"
 onclick="return expandInput(this)">
</form>
 R„   (    (   R„   R>   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyRƒ   /  s    sE  
<html>
<head>
 <title>Server Error</title>
 %(head_html)s
</head>
<body>

<div id="error-area" style="display: none; background-color: #600; color: #fff; border: 2px solid black">
<div id="error-container"></div>
<button onclick="return clearError()">clear this</button>
</div>

%(repost_button)s

%(body)s

</body>
</html>
c         C  s1   | d k r! | j d d ƒ } n  t |  d | ƒS(   s¶  
    Wraps the application in an interactive debugger.

    This debugger is a major security hole, and should only be
    used during development.

    xmlhttp_key is a string that, if present in QUERY_STRING,
    indicates that the request is an XMLHttp request, and the
    Javascript/interactive debugger should not be returned.  (If you
    try to put the debugger somewhere with innerHTML, you will often
    crash the browser)
    RL   RK   N(   R   RM   RJ   (   R8   RN   RL   (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   make_eval_exceptionX  s    (5   t   __doc__t
   __future__R    R!   Rc   R   RF   t	   six.movesR   R   RÛ   t	   itertoolsR¹   R   t   paste.exceptionsR   R   R   t   pasteR   R   R   R   R	   R
   t   paste.evalexceptionR   t
   paste.utilR   R¾   R   R/   R   R   R*   R<   RE   Ry   R@   RH   RI   t   objectRJ   R¥   RÖ   RÔ   R   RË   RÏ   Rƒ   RÐ   R   Rò   (    (    (    sH   /usr/local/lib/python2.7/dist-packages/paste/evalexception/middleware.pyt   <module>   sJ   				"		
ÇF	 	*		'