Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/tuned/profiles/functions/ |
| [Home] [System Details] [Kill Me] |
�
��\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 RR
(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
RRR (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�s�tjd|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 RRR
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.logsttunedttuned.conststconststtuned.utils.commandsRtlogstgetRtcmdR(((sF/usr/lib/python2.7/site-packages/tuned/profiles/functions/functions.pyt<module>s