Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/monitor/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pyc

ó
ÍÿŠTc@sVddlZddlmZddlmZddlmZdefd„ƒYZdS(iÿÿÿÿN(t	read_file(tAPT_PREFERENCES_SIZE_LIMIT(tDataWatchertAptPreferencescBsPeZdZdZdZdZdZdZeZ	dd„Z
d„Zd„ZRS(	s:
    Report the system APT preferences configuration.
    sapt-preferencestdatai„tpackages/etc/aptcCs
||_dS(N(t_etc_apt_directory(tselftetc_apt_directory((sD/usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pyt__init__sc
Cs[i}d„}tjj|jdƒ}tjj|ƒrL||ƒ||<ntjj|jdƒ}tjj|ƒrÍxTtj|ƒD]@}tjj||ƒ}tjj|ƒr†||ƒ||<q†q†Wn|ikrÝdS|j	t
|jƒƒ}x^|jƒD]P\}}t
|ƒt
|ƒ|kr|t
|ƒ}	||d|	!||<qqW|S(s·Return a C{dict} mapping APT preferences files to their contents.

        If no APT preferences configuration is set at all on the system, then
        simply return C{None}
        cSstt|ƒƒS(N(tunicodeR(tfilename((sD/usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pyt<lambda>supreferencesu
preferences.diN(
tostpathtjoinRtexiststisdirtlistdirtisfiletNonet
size_limittlentkeyst	iteritems(
RRtread_unicodetpreferences_filenametpreferences_directorytentryRtitem_size_limittcontentsttruncated_contents_size((sD/usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pytget_datas*			cCs|jdtƒS(Nturgent(texchangetTrue(R((sD/usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pytrun8s(
t__name__t
__module__t__doc__tpersist_nametmessage_typetmessage_keytrun_intervaltscopeRRR	R R$(((sD/usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pyR	s	 (R
tlandscape.lib.fsRtlandscape.constantsRtlandscape.monitor.pluginRR(((sD/usr/lib/python2.7/dist-packages/landscape/monitor/aptpreferences.pyt<module>s