ó ð v_c@sddlZddlZddlZddlmZddlZddlmZdej fd„ƒYZ dZ dZ ie d6e d 6Z d e Zd e Zd e Zd dd„ƒYZddd„ƒYZddd„ƒYZd„ZedkrÿeƒndS(iÿÿÿÿN(t format_number(tcElementTree_xmlparsetMetaLinkRepoErrorParseFailcBseZdZRS(s< An exception thrown for an unparsable MetaLinkRepoMD file. (t__name__t __module__t__doc__(((s0/usr/lib/python2.7/site-packages/yum/metalink.pyRsshttp://www.metalinker.org/s%http://fedorahosted.org/mirrormanagertmltmms{%(ml)s}files/{%(ml)s}files${%(mm)s}alternates/{%(mm)s}alternates{%(ml)s}resourcest MetaLinkFilecBs}eZdZd„Zd„Zd„ZeeƒZd„ZeeƒZ d„Z ee ƒZ d„Z ee ƒZ d„ZRS(s1 Parse the file metadata out of a metalink file. cCsQtddddgƒ}xá|D]Ù}tr.q|jdtkrVt|jƒ|_q|jdtkr~t|jƒ|_q|jdtkri|_ x[|D]P}|jdtkr¡|j d ƒ|kr¡|j|j |j d ƒj ƒ Iterate plain urls for the mirrors, like the old mirrorlist. cSs|jdƒdjdƒdS(Nt/it@iÿÿÿÿ(tsplit(R6((s0/usr/lib/python2.7/site-packages/yum/metalink.pytässfile:shttp:sftp:shttps:s/repodata/repomd.xmlN(RAR6t startswithRBtendswithRO(Rturl2hosttmirrorR6thost((s0/usr/lib/python2.7/site-packages/yum/metalink.pyturlsßs   cCsÏt|jƒ}t}xU|jD]J}|s@|ddd7}n|rS|d7}nt}|t|ƒ7}qWt}xU|jD]J}|sž|ddd7}n|r±|d7}nt}|t|ƒ7}q}W|S(Ns%s t-iOs (tstrR?RR@R:RA(RR+tdonetorepomdR6((s0/usr/lib/python2.7/site-packages/yum/metalink.pyR"üs$  (RRRRR\R"(((s0/usr/lib/python2.7/site-packages/yum/metalink.pyR<¯s - cCs~d„}ttjƒdkr(|ƒnxOtjdD]@}tjj|ƒs]dG|GHq6ndG|GHt|ƒGHdGHq6WdS(s MetaLinkRepoMD test function. cSs)tjdtjdIJtjdƒdS(NsUsage: %s ...ii(tsyststderrtargvtexit(((s0/usr/lib/python2.7/site-packages/yum/metalink.pytusagesiis No such file:sFile:R#N(RORaRcRCRDRER<(ReRP((s0/usr/lib/python2.7/site-packages/yum/metalink.pytmain s     t__main__((((RaRCR turlgrabber.progressRtErrorstyum.miscRRFt RepoErrorRRRt __XML_FMT__RIRKRMRR.R<RfR(((s0/usr/lib/python2.7/site-packages/yum/metalink.pyts&         K2^