ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ A[c@`sdZddlmZddlmZddlmZddlmZddlmZddlmZdd d gZ dd l Z dd l Z dd l Z dd l Z dd lZdd lmZmZdd lmZddlmZddlmZdd ljjjZdZdZe jde j Z!de"fdYZ#de#fdYZ$dZ%de#fdYZ&e'e(e j)dZ*de*Z+e#j,Z,d S(u:Classes to generate plain text from a message object tree.i(tprint_function(tunicode_literals(tdivision(tabsolute_import(tsuper(tstru GeneratoruDecodedGeneratoruBytesGeneratorN(tStringIOtBytesIO(tcompat32(tHeader(t_has_surrogatesu_u u^From t GeneratorcB`seZdZeddZdZeddZdZ dZ dZ dZ dZ d Zd Zd Zd ZeZd ZdZdZdZeddZedZRS(uGenerates output from a Message object tree. This basic generator writes the message to the given file object as plain text. cK`sNd|kr |d}|d=nd}||_||_||_||_dS(Nupolicy(tNonet_fpt _mangle_from_t maxheaderlentpolicy(tselftoutfpt mangle_from_Rt _3to2kwargsR((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt__init__+s    cC`s|jj|dS(N(R twrite(Rts((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRHscC`s?|jdkr|jn|j}|dk rB|jd|}n|jdk ri|jd|j}n|j|_|j|j|_d|_|jd|_ |j}|j}zn||_||_|r|j }|sdt j t j }n|j ||jn|j|Wd||_||_XdS(uzPrint the message object tree rooted at msg to the output file specified when the Generator instance was created. unixfrom is a flag that forces the printing of a Unix From_ delimiter before the first object in the message tree. If the original message has no From_ delimiter, a `standard' one is crafted. By default, this is False to inhibit the printing of any From_ delimiter. Note that for subobjects, no From_ line is printed. linesep specifies the characters used to indicate a new line in the output. The default value is determined by the policy. tlineseptmax_line_lengthuu From nobody N(RR tcloneRRt_NLt_encodet _encoded_NLt_EMPTYt_encoded_EMTPYt get_unixfromttimetctimeRt_write(RtmsgtunixfromRRtold_gen_policytold_msg_policytufrom((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pytflattenLs,!         cC`s|j||jdd|jS(u1Clone this generator with the exact same options.RN(t __class__RR R(Rtfp((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR{s ucC`stS(N(R(R((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt _new_bufferscC`s|S(N((RR((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRscC`s|s dS|jt}x8|d D],}|j|jd|j|jq$W|djd}|j|t|dt|kr|j|jndS(Niu (t splitlinestTrueRtrstripRtlen(Rtlinestlinet laststripped((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt _write_liness cC`s|j}z$|j|_}|j|Wd||_Xt|dd}|dkrh|j|n |||jj|jdS(Nu_write_headers(R R,t _dispatchtgetattrR t_write_headersRtgetvalue(RR$toldfptsfptmeth((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR#s    cC`s|j}|j}tj||fjdd}t|d|d}|dkr|jdd}t|d|d}|dkr|j}qn||dS(Nu-u_u_handle_(tget_content_maintypetget_content_subtypet UNDERSCOREtjointreplaceR6R t _writeBody(RR$tmaintsubtspecificR;tgeneric((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR5s  !  cC`sMx6|jD](\}}|j|jj||q W|j|jdS(N(t raw_itemsRRtfoldR(RR$thtv((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR7s cC`s|j}|dkrdSt|tsDtdt|nt|jr|jd}|dk r|d=|j |||j}qn|j rt j d|}n|j |dS(Nustring payload expected: %sucharsetucontent-transfer-encodingu>From (t get_payloadR t isinstanceRt TypeErrorttypeR t_payloadt get_paramt set_payloadRtfcreRCR4(RR$tpayloadtcharset((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt _handle_texts    c C`sLg}|j}|dkr'g}n;t|trG|j|dSt|tsb|g}nxX|D]P}|j}|j|}|j|dt d|j |j |j qiW|j }|s|jj|}|j|}|j|n|jdk rY|jr0tjd|j} n |j} |j| |j|j n|jd||j |r|jj|jdnx=|D]5} |j|j d||j |jj| qW|j|j d|d|jdk rH|j|j |jr/tjd|j} n |j} |j| ndS(NR%Ru>From u--i(RJR RKRRtlistR,RR)tFalseRtappendR8t get_boundaryRR?t_make_boundaryt set_boundarytpreambleRRQRCR4R tpoptepilogue( RR$tmsgtextstsubpartstpartRtgtboundarytalltextR[t body_partR]((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt_handle_multipartsL              cC`s@|j}|jdd|_z|j|Wd||_XdS(NRi(RRRe(RR$tp((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt_handle_multipart_signed/s  cC`sg}x|jD]}|j}|j|}|j|dtd|j|j}|j|j}|r|d|j kr|j |jj |d q|j |qW|j j |jj |dS(NR%Ri(RJR,RR)RVRR8tsplitRt_encoded_EMPTYRWR?R R(RR$tblocksR`RRattextR1((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt_handle_message_delivery_status:s   cC`s|j}|j|}|j}t|trg|j|jddtd|j|j }n|j |}|j j |dS(NiR%R( R,RRNRKRUR)RJRVRR8RR R(RR$RRaRR((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyt_handle_messageOs  %cC`stjtj}d t|d}|dkr4|S|}d}xatr|jdtj |dtj }|j |sPn|dt |}|d7}qCW|S( Nu=iu==iu^--u(--)?$u.iu===============( trandomt randrangetsystmaxsizet_fmtR R.t _compile_retretescapet MULTILINEtsearchR(tclsRkttokenRbtbtcountertcre((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRYhs  &cC`stj||S(N(Rttcompile(RxRtflags((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRszsN(t__name__t __module__t__doc__R.R RRRVR)RRiR,RR4R#R5R7RTRAReRgRlRmt classmethodRYRs(((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR !s* /       ;  tBytesGeneratorcB`sVeZdZdZdZdZdZdZdZeZ e dZ RS(uGenerates a bytes version of a Message object tree. Functionally identical to the base Generator except that the output is bytes and not string. When surrogates were used in the input to encode bytes, these are decoded back to bytes for output. If the policy has cte_type set to 7bit, then the message is transformed such that the non-ASCII bytes are properly content transfer encoded, using the charset unknown-8bit. The outfp object must accept bytes in its write method. tcC`s&|jjt|jdddS(Nuasciiusurrogateescape(R RRtencode(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRscC`stS(N(R(R((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR,scC`s |jdS(Nuascii(R(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRscC`sPx9|jD]+\}}|jj|jj||q W|j|jdS(N(RFR RRt fold_binaryR(RR$RHRI((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR7s#cC`s|jdkrdSt|jrl|jjdk rl|jrYtjd|j|_n|j|jnt t |j |dS(Nu7bitu>From ( RNR R Rtcte_typeRRQRCR4RRRT(RR$((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRTs" cC`stj|jd|S(Nuascii(RtR}R(RxRR~((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRss( RRRRiRR,RR7RTRARRs(((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR~s      uD[Non-text (%(type)s) part of message omitted, filename %(filename)s]tDecodedGeneratorcB`s)eZdZedddZdZRS(uGenerates a text representation of a message. Like the Generator base class, except that non-text parts are substituted with a format string representing the part. iNcC`s;tj|||||dkr.t|_n ||_dS(uLike Generator.__init__() except that an additional optional argument is allowed. Walks through all subparts of a message. If the subpart is of main type `text', then it prints the decoded payload of the subpart. Otherwise, fmt is a format string that is used instead of the message payload. fmt is expanded with the following keywords (in %(keyword)s format): type : Full MIME type of the non-text part maintype : Main MIME type of the non-text part subtype : Sub-MIME type of the non-text part filename : Filename of the non-text part description: Description associated with the non-text part encoding : Content transfer encoding of the non-text part The default value for fmt is None, meaning [Non-text (%(type)s) part of message omitted, filename %(filename)s] N(R RR t_FMTRr(RRRRtfmt((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRs  cC`sx|jD]}|j}|dkrJt|jdtd|q |dkrYq t|ji|jd6|jd6|jd6|jdd 6|j d d d 6|j d dd6d|q WdS(Nutexttdecodetfileu multipartutypeumaintypeusubtypeu [no filename]ufilenameuContent-Descriptionu[no description]u descriptionuContent-Transfer-Encodingu [no encoding]uencoding( twalkR<tprintRJRVRrtget_content_typeR=t get_filenametget(RR$R`tmaintype((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyR5s           N(RRRR.R RR5(((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyRsiu%%0%dd(-Rt __future__RRRRtfuture.builtinsRRt__all__RtRpR!RntwarningstioRRt"future.backports.email._policybaseRtfuture.backports.email.headerR tfuture.backports.email.utilsR tfuture.backports.email.charsett backportstemailRSt_charsetR>tNLR}RvRQtobjectR RRRR0treprRqt_widthRrRY(((sQ/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/generator.pyts8     ^68