a àMÒei ã@sPddlZddlZddlZddlZddlZddlZejjGdd„dejj ƒƒZ dS)éNcsteZdZdZgd¢Z‡fdd„Zddd„Zedd d „ƒZdd d „Z eddd„ƒZ dd„Z dd„Z edd„ƒZ ‡ZS)ÚURIz URI record)ÚpriorityÚweightÚtargetcsRtƒ ||¡| |¡|_| |¡|_| |d¡|_t|jƒdkrNtj   d¡‚dS)NTrzURI target cannot be empty) ÚsuperÚ__init__Z _as_uint16rrZ _as_bytesrÚlenÚdnsÚ exceptionÚ SyntaxError)ÚselfÚrdclassÚrdtyperrr©Ú __class__©ú7/usr/lib/python3.9/site-packages/dns/rdtypes/ANY/URI.pyr$s   z URI.__init__NTcKsd|j|j|j ¡fS)Nz %d %d "%s")rrrÚdecode)r ÚoriginÚ relativizeÚkwrrrÚto_text,sz URI.to_textc CsJ| ¡}| ¡}| ¡ ¡} |  ¡s8|  ¡s8tj d¡‚|||||| jƒS)NzURI target must be a string) Z get_uint16ÚgetZunescapeZis_quoted_stringZ is_identifierr r r Úvalue) Úclsr rÚtokrrZ relativize_torrrrrrÚ from_text/s   z URI.from_textFcCs,t d|j|j¡}| |¡| |j¡dS)Nú!HH)ÚstructÚpackrrÚwriter)r ÚfileÚcompressrZ canonicalizeZtwo_intsrrrÚ_to_wire:s z URI._to_wirecCs>| d¡\}}| ¡}t|ƒdkr.tj d¡‚||||||ƒS)NrrzURI target may not be empty)Z get_structZ get_remainingrr r Z FormError)rr rÚparserrrrrrrrÚfrom_wire_parser?s   zURI.from_wire_parsercCs|jS©N)r©r rrrÚ_processing_priorityGszURI._processing_prioritycCs|jSr&)rr'rrrÚ_processing_weightJszURI._processing_weightcCstjj |¡Sr&)r ZrdtypesÚutilZweighted_processing_order)rÚiterablerrrÚ_processing_orderMszURI._processing_order)NT)NTN)NNF)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__rrÚ classmethodrr#r%r(r)r,Ú __classcell__rrrrrs  ÿ  r) rZ dns.exceptionr Z dns.immutableZdns.nameZ dns.rdataZdns.rdtypes.utilZ immutableZrdataZRdatarrrrrÚs