Viewing File: /usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyc

ó
oBú]c@sšddlZddlmZddlZddlZddlZdZejdeƒejdƒejdƒgZd„Zdej	fd	„ƒYZ
dS(
iÿÿÿÿN(tStringIOs[a-zA-Z_]+[a-zA-Z0-9_]*s\$s\$[0-9#\?\-@\*]s\$\{.+\}cCs(x!tD]}|j|ƒrtSqWtS(N(tSHELL_VAR_REGEXEStsearchtTruetFalse(ttexttr((sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt_contains_shell_variable&s
tSysConfcBs5eZdZd„Zd„Zed„Zd„ZRS(sA configobj.ConfigObj subclass specialised for sysconfig files.

    :param contents:
        The sysconfig file to parse, in a format accepted by
        ``configobj.ConfigObj.__init__`` (i.e. "a filename, file like object,
        or list of lines").
    cCs#tjj||dtdtƒdS(Nt
interpolationtwrite_empty_values(t	configobjt	ConfigObjt__init__RR(tselftcontents((sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyR
5scCs`|jƒ}tƒ}t|ttfƒrC|jdj|ƒƒn|jt|ƒƒ|jƒS(Ns
(twriteRt
isinstancetlistttupletjointstrtgetvalue(RRtout_contents((sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt__str__:s	cs)t|tjƒs%td|ƒ‚nt|ƒdkr;dSd}|ddkrˆ|ddkrˆt|ƒdkr‡fd†}qn|jƒjd	ƒrµ|jƒjd
ƒrµn`t	j
d|ƒrt|ƒr	t	j
d|ƒr÷‡fd
†}q‡fd†}qtj
}n|s|S||ƒS(NsValue "%s" is not a stringitt"t'iÿÿÿÿicsˆj|ƒ|S(N(t_get_single_quote(tx(R(sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt<lambda>Kss$(t)s	[\t\r\n ]s[\n\"']csˆj|ƒ|S(N(t_get_triple_quote(R(R(sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyRWscsˆj|ƒ|S(N(R(R(R(sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyRZs(RR(RR(Rtsixtstring_typest
ValueErrortlentNonetstript
startswithtendswithtreRRtpipestquote(Rtvaluet	multilinet	quot_func((RsF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt_quoteCs& *cCs_|j|j|ƒƒ}|j|j|ƒƒ}|j|ƒ}d|||jdƒ||fS(Ns
%s%s%s%s%st=(t_decode_elementR/t_a_to_u(Rt
indent_stringtentryt
this_entrytcommenttvaltkeytcmnt((sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt_write_linebs(t__name__t
__module__t__doc__R
RRR/R:(((sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyR-s
			(R!RR*R)RtSHELL_VAR_RULEtcompileRRRR(((sF/usr/lib/python2.7/site-packages/cloudinit/distros/parsers/sys_conf.pyt<module>s		
Back to Directory File Manager