MINI MINI MANI MO

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

ó
©=[c@sddlZddlZddlZddlmZddljZddlmZddl	m
Z
mZejj
ƒZddd„ƒYZdS(	iÿÿÿÿNi(t	functions(tcommands(t	ConfigObjtConfigObjErrort	VariablescBsheZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„ZRS(s8
	Storage and processing of variables used in profiles
	cCs1tƒ|_i|_i|_tjƒ|_dS(N(Rt_cmdt
_lookup_ret_lookup_envRt	Functionst
_functions(tself((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyt__init__s		cCs!|j|ƒdkr|S||S(Ni(tfind(R
tstprefix((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyt_add_env_prefixscCstjd|ƒS(Ns\w+$(tretmatch(R
tvariable((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyt
_check_varscCs|dkrdSt|ƒ}|j|ƒs@tjd|ƒdS|j|ƒ}||jdtj|ƒd<||j	|j
|tjƒ<dS(Ns6variable definition '%s' contains unallowed characterss
(?<!\\)\${t}(
tNonetstrRtlogterrortexpandRRtescapeRRtconstst
ENV_PREFIX(R
RtvalueR
tv((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pytadd_variablescCs)x"|D]}|j|||ƒqWdS(N(R(R
tdtitem((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pytadd_dict+s
c
CsÅtjj|ƒs'tjd|ƒdSy(t|dtdtdtdtƒ}Wn#tk
rttjd|ƒdSXxI|D]A}t	||t
ƒr©|j||ƒq||j|||ƒq|WdS(Ns#unable to find variables_file: '%s'traise_errorst
file_errortlist_valuest
interpolations"error parsing variables_file: '%s'(
tostpathtexistsRRRtTruetFalseRt
isinstancetdictR"R(R
tfilenametconfigR!((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyt
add_from_file/s(

cCs[xT|D]L}t|ƒdkr?|jtjj||ƒƒq|j|||ƒqWdS(Ntinclude(RR0R'R(tnormpathR(R
tcfgR!((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pytadd_from_cfg>s
 cCs%tjdd|jj|j|ƒƒS(Ns\\(\${\w+})s\1(RtsubRtmultiple_re_replaceR(R
R((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyt
expand_staticFscCs5|dkrdS|jt|ƒƒ}|jj|ƒS(N(RR7RR	R(R
RR
((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyRIscCs|jS(N(R(R
((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pytget_envQs(
t__name__t
__module__t__doc__RRRRR"R0R4R7RR8(((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyRs				
					((R'Rt
tuned.logsttunedRttuned.constsRttuned.utils.commandsRt	configobjRRtlogstgetRR(((s</usr/lib/python2.7/site-packages/tuned/profiles/variables.pyt<module>s

OHA YOOOO