ó æ ”\c@sJddlZddlZdgZejjƒZdefd„ƒYZdS(iÿÿÿÿNt PluginLoadercBsDeZdddgZd„Zd„Zd„Zd„Zd„ZRS(t _namespacet_prefixt _interfacecCs tƒ‚dS(s~ This method has to be implemented in child class and should set _namespace, _prefix, and _interface member attributes. N(tNotImplementedError(tself((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyt_set_loader_parameters scCs<tt|ƒjƒd|_d|_d|_|jƒdS(N(tsuperRt__init__tNoneRRRR(R((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyRs     cCs&d|j|j|f}|j|ƒS(Ns%s.%s%s(RRt _get_class(Rt plugin_namet module_name((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyt load_pluginscCsÅtjd|ƒt|ƒ}|jdƒ}|jdƒx.t|ƒdkrit||jdƒƒ}q<WxH|jD]=}t||ƒ}t|ƒtkrtt ||j ƒrt|SqtWt dƒ‚dS(Nsloading module %st.isCannot find the plugin class.( tlogtdebugt __import__tsplittpoptlentgetattrt__dict__ttypet issubclassRt ImportError(RR tmoduletpathtnametcls((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyR "s  $cCs¸t|jƒ}g}xœtj|jjdƒD]}ygtjj|ƒd}|jdƒscw/n|j d|j|fƒ}||kr›|j |ƒnWq/t k r¯q/Xq/W|S(Nitplugin_s%s.%s( RRtostlistdirtpluginst__path__Rtsplitextt startswithR tappendR(Rtplugins_packaget plugin_clssR t plugin_class((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pytload_all_plugins2s   (t__name__t __module__t __slots__RRR R R)(((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyRs    ( t tuned.logsttunedRt__all__tlogstgetRtobjectR(((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyts