Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ©ft`‹ã@s~ddlmZddlmZddlmZmZddlZddlZ ddl Zddl Zddl Z ddl Z ddlZe jdƒZGdd„deƒZdS)é)Úabsolute_import)Úunicode_literals)Ú_ÚucdNÚdnfc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) Ú RepoReadercCs||_||_dS)N)ÚconfÚopts)Úselfrr ©r ú/usr/lib/python3.6/read.pyÚ__init__$szRepoReader.__init__c csÆx|j|jjƒD] }|VqWg}x8|jjD],}x&tjtjj|dƒƒD]}|j|ƒqFWq,W|j dd„d�xT|D]L}yx|j|ƒD] }|Vq„WWqrt j j k r¼t jtdƒ|ƒYqrXqrWdS)Nz*.repocSstjj|dd…ƒS)Nééûÿÿÿ)rÚutilZ split_path)Úxr r r Ú5sz%RepoReader.__iter__..)Úkeyz'Warning: failed loading '%s', skipping.)Ú _get_reposrZconfig_file_pathÚreposdirÚglobÚosÚpathÚjoinÚappendÚsortrÚ exceptionsÚ ConfigErrorÚloggerÚwarningr)r ÚrZ repo_configsrrÚrepofnr r r Ú__iter__(s   zRepoReader.__iter__c Cs^tjjj||jjƒ}tjj|ƒ}|dk rl||krJtdƒj |||||ƒ}ntdƒj ||||ƒ}tj j |ƒ‚tjj ||jƒ}y|j |||tjjƒWnZtk rî}z>||krÂtdƒj |||ƒ}ntdƒj ||ƒ}tj j |ƒ‚WYdd}~XnX|jdƒtjjk�r8||k�r tdƒj ||ƒ}ntdƒj |ƒ}tj|ƒt|jƒ|_|jj|jjƒ||_|S) z)Build a repository using the parsed data.Nz&Bad id for repo: {} ({}), byte = {} {}z!Bad id for repo: {}, byte = {} {}z.Repository '{}' ({}): Error parsing config: {}z)Repository '{}': Error parsing config: {}Únamez@Repository '{}' ({}) is missing name in configuration, using id.z;Repository '{}' is missing name in configuration, using id.)ÚlibdnfrÚ ConfigParserZ substituteÚ substitutionsrÚrepoZrepo_id_invalidrÚformatrrZRepoZ _populateZPRIO_REPOCONFIGÚ ValueErrorZ _get_priorityZ PRIO_DEFAULTrrrr#Z_substitutionsÚupdateZcfg) r ÚparserZid_r!Zsubstituted_idZinvalidÚmsgr'Úer r r Ú _build_repo?s8         zRepoReader._build_repoccs|jj}tjjƒ}|j|ƒy|j|ƒWndtk rd}ztjj t dƒj ||ƒƒ‚WYdd}~Xn,t k rŽ}zt j|ƒWYdd}~XnXx„|jƒD]x}|dkr¨qšy|j|t|ƒ|ƒ}Wn:tjjtjj fk rø}zt j|ƒwšWYdd}~XnX||_|j|jƒ|VqšWdS)z4Parse and yield all repositories from a config file.zParsing file "{}" failed: {}NÚmain)rr&r$r%ZsetSubstitutionsÚreadÚ RuntimeErrorrrrrr(ÚIOErrorrrZgetDatar.rZ RepoErrorZrepofileZ_configure_from_optionsr )r r!Zsubstsr+r-ZsectionZthisrepor r r rhs(  (  zRepoReader._get_reposN)Ú__name__Ú __module__Ú __qualname__r r"r.rr r r r r#s)r)Z __future__rrZdnf.i18nrrZdnf.confrZ libdnf.confr$Zdnf.exceptionsZdnf.reporZloggingrZ getLoggerrÚobjectrr r r r Ús