ok

Mini Shell

Direktori : /lib/python2.7/site-packages/tuned/utils/
Upload File :
Current File : //lib/python2.7/site-packages/tuned/utils/plugin_loader.pyc

�
��\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_parametersscCs�tt|�j�d|_d|_d|_|j�t|j�t	ksSt
�t|j�t	ksnt
�t|j�tkr�t|jt�s�t
�dS(N(
tsuperRt__init__tNoneRRRRttypetstrtAssertionErrort
issubclasstobject(R((s=/usr/lib/python2.7/site-packages/tuned/utils/plugin_loader.pyRs			
cCs>t|�tkst�d|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_pluginscCs�tjd|�t|�}|jd�}|jd�x.t|�dkrit||jd��}q<WxH|jD]=}t||�}t|�tkrtt	||j
�rt|SqtWtd��dS(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
$cCs�t|j�}g}x�tj|jjd�D]�}ygtjj|�d}|jd�scw/n|j	d|j|f�}||kr�|j
|�nWq/tk
r�q/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	

Zerion Mini Shell 1.0