MINI MINI MANI MO

Path : /lib/python2.7/site-packages/tuned/profiles/functions/
File Upload :
Current File : //lib/python2.7/site-packages/tuned/profiles/functions/functions.pyc

ó
©=[c@sŽddlZddlZddlZddlmZddlZddljZddl	m
Z
ejjƒZ
e
ƒZddd„ƒYZdS(iÿÿÿÿNi(t
repository(tcommandst	FunctionscBsbeZdZd„Zdd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„ZRS(s
	Built-in functions
	cCstjƒ|_|jƒdS(N(Rt
Repositoryt_repositoryt_parse_init(tself((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt__init__stcCs7d|_||_t|ƒ|_g|_t|_dS(Ni(t_cntt_strtlent_lent_stacktFalset_esc(Rts((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyRs
			cCs$|j|jkr |j|jSdS(NR(R	RR
(R((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt
_curr_charscCs|j|j|j|!S(N(R
R	(RR((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt_curr_substr scCs|jj||jfƒdS(N(R
tappendR	(Rtesc((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt	_push_pos#scCsu|j| ||j|d|_t|jƒ|_|jt|ƒ||d7_|jdkrqd|_ndS(Nii(R
RRR	(RtatbR((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt_sub&s
#!cCstjd|j||j!ƒ}|ddkr3dSg|D]}t|ƒjddƒ^q:}tjd|dƒstjd|dƒdSy|j	j
|dƒ}Wn'tk
rÐtjd	|dƒdSX|j|d
ƒ}|dkrôdS|j||j|ƒdS(Ns(?<!\\):is${fs\:t:s\w+$isinvalid function name '%s'sfunction '%s' not implementedi(tretsplitR
R	tstrtreplacetmatchtlogterrorRt	load_functImportErrortexecutetNoneR(Rt_fromtsltvtfR((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt
_process_func-s +
cCs|j|ƒxã|j|jkrò|jƒdkr‘y|jjƒ}Wn&tk
rotjd|ƒ|j	SX|ds¹|j
|dƒq¹n(|jdƒdkr¹|j|j
ƒn|jƒdkr×t|_
n	t|_
|jd7_qWt|jƒrtjd|ƒn|j	S(	Nt}s.invalid variable syntax, non pair '}' in: '%s'iiis${s\s.invalid varialbe syntax, non pair '{' in: '%s'(RR	RRR
tpopt
IndexErrorRR R
R)RRRtTrueRR(RRtsi((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt_process?s&


	cCs8|dks|dkr|Stjdd|j|ƒƒS(NRs\\(\${f:.*})s\1(R$RtsubR/(RR((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pytexpandVs(t__name__t
__module__t__doc__RRRRRRR)R/R1(((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyR
s							((tosRtglobRRt
tuned.logsttunedttuned.conststconststtuned.utils.commandsRtlogstgetRtcmdR(((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt<module>s	

OHA YOOOO