• File: plugin_loader.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyc
  • Date Modified: 09/21/2022 11:48 AM
  • File size: 2.75 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

\c@sJddlZddlZdgZejjZdefdYZdS(iNtPluginLoadercBsDeZdddgZdZdZdZdZdZRS(t
_namespacet_prefixt
_interfacecCs
tdS(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_parametersscCstt|jd|_d|_d|_|jt|jt	ksSt
t|jt	ksnt
t|jtkrt|jtst
dS(N(
tsuperRt__init__tNoneRRRRttypetstrtAssertionErrort
issubclasstobject(R((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyRs			
cCs>t|tkstd|j|j|f}|j|S(Ns%s.%s%s(R
RRRRt
_get_class(Rtplugin_nametmodule_name((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pytload_pluginscCstjd|t|}|jd}|jdx.t|dkrit||jd}q<WxH|jD]=}t||}t|tkrtt	||j
rt|SqtWtddS(Nsloading module %st.isCannot find the plugin class.(tlogtdebugt
__import__tsplittpoptlentgetattrt__dict__R
R
RtImportError(RRtmoduletpathtnametcls((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyR"s
$cCst|j}g}xtj|jjdD]}ygtjj|d}|jdscw/n|j	d|j|f}||kr|j
|nWq/tk
rq/Xq/W|S(Nitplugin_s%s.%s(RRtostlistdirtpluginst__path__Rtsplitextt
startswithRtappendR(Rtplugins_packagetplugin_clssRtplugin_class((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pytload_all_plugins2s 
(t__name__t
__module__t	__slots__RRRRR,(((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyRs				(	t
tuned.logsttunedR"t__all__tlogstgetRRR(((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyt<module>s