ó
l]›]c           @` sc   d  Z  d d l m Z m Z m Z m Z d d l Z d d l Z d e f d „  ƒ  YZ	 d „  Z
 d S(   u=   
Exports the following items:

 - unwrap()
 - APIException()
i    (   t   unicode_literalst   divisiont   absolute_importt   print_functionNt   APIExceptionc           B` s   e  Z d  Z RS(   uI   
    An exception indicating an API has been removed from asn1crypto
    (   t   __name__t
   __module__t   __doc__(    (    (    s1   lib/python2.7/site-packages/asn1crypto/_errors.pyR      s   c         G` s_   t  j |  ƒ } | j d ƒ d k r< t j d d | ƒ } n  | rO | | } n  | j ƒ  } | S(   u_  
    Takes a multi-line string and does the following:

     - dedents
     - converts newlines with text before and after into a single line
     - strips leading and trailing whitespace

    :param string:
        The string to format

    :param *params:
        Params to interpolate into the string

    :return:
        The formatted string
    u   
iÿÿÿÿu   (?<=\S)
(?=[^ 
	\d\*\-=])u    (   t   textwrapt   dedentt   findt   ret   subt   strip(   t   stringt   paramst   output(    (    s1   lib/python2.7/site-packages/asn1crypto/_errors.pyt   unwrap   s    (   R   t
   __future__R    R   R   R   R   R   t	   ExceptionR   R   (    (    (    s1   lib/python2.7/site-packages/asn1crypto/_errors.pyt   <module>   s
   "