Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/LanguageSelector/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyc


/Qc@sddlZejddeddlZddlZdefdYZdefdYZdefd	YZ	d
ej
fdYZedkrdd
l
m
Z
dZe
deZeeejjZdGHdjgejD]Zde^qGHndS(iNtignoresapt API not stable yettLanguagePackageStatuscBseZdZdZRS(cCs1||_||_t|_t|_t|_dS(N(tlanguageCodetpkgname_templatetFalset	availablet	installedtdoChange(tselfRtpkg_template((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyt__init__s
				cCs8d|j|jt|jt|jt|jfS(NsZLanguagePackageStatus(langcode: %s, pkgname %s, available: %s, installed: %s, doChange: %s(RRtstrRRR(R((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyt__str__s(t__name__t
__module__R
R(((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyRs	tLanguageInformationcBs\eZdddZedZedZedZedZdZ	RS(cCs||_||_i|_t|d|jd<xO|jjD]>}|j|}||k|_|jrA||j|_qAqAWdS(Nslanguage-pack-%stlanguagePack(	RtlanguagetlanguagePkgListRt
itervaluesRRtis_installedR(RtcacheRRtlangpkg_statustpkgname((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR
s			
	cCs|jr|jrtStS(sK returns True if only parts of the language support packages are installed (tnotInstalledt
fullInstalledtTrueR(R((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pytinconsistent'scCsWxP|jjD]?}|js%qn|jr8|jpH|joH|jstSqWtS(sM return True if all of the available language support packages are installed (RtvaluesRRRRR(Rtpkg((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR,s	&cCsWxP|jjD]?}|js%qn|jr9|jpH|joH|jstSqWtS(sN return True if none of the available language support packages are installed (RRRRRRR(RR((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR3s	&cCs+x$|jjD]}|jrtSqWtS(sM returns true if anything in the state of the language packs/support changes (RRRRR(RR((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pytchanges:s	cCsd|j|jfS(Ns%s (%s)(RR(R((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR@sN(
R
RtNoneR
tpropertyRRRRR(((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyRstExceptionPkgCacheBrokencBseZRS((R
R(((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR!DstLanguageSelectorPkgCachecBsDeZdZedZdZdZdZdZRS(cCsPtjj|||jjdkr1tn||_tj||_	dS(Ni(
tapttCacheR
t	_depcachetbroken_countR!t_localeinfotlanguage_support_pkgstLanguageSupporttlang_support(Rt
localeinfotprogress((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR
Is
	cCsx|jjD]}xx|jD]m}|jdjdrAqn|jdjdr_qn|jdkrtqn|jr|jrtSqWq
Wt	S(s, verify that a network package lists exists tscdrom:shttp://security.ubuntu.comsDebian Package Index(
t_listtlisttindex_filestarchive_urit
startswithtlabeltexiststhas_packagesRR(Rt	metaindext	indexfile((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pythavePackageListsPscCs|jjdS(s clear the selections N(R%tinit(R((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pytclear_scCsng}g}xU|jD]G}|js1|jrD|j|jn|jr|j|jqqW||fS(N(tget_changestmarked_installtmarked_upgradetappendtnamet
marked_delete(Rtto_insttto_rmR((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pytgetChangesListcs	cCsx|jjD]\}}|jr|jj|jd|j}yv|jrxf|D]<}|jds|jd|jrV||j	qVqVWnx|D]}||j
qWWqtk
rtqXqqWdS(s$ commit changed status of list itemsRslanguage-pack-t-N(
Rt	iteritemsRR*t	by_localeRRR2tendswithtmark_deletetmark_installtSystemErrorR!(RtlitkeytitemtpkgsR((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyttryChangeDetailsms		


cCsg}x|jjjD]k\}}|dkr7qnt|||}g|jjD]}|jrY|^qYr|j|qqW|S(s5 returns a list with language packs/support packages tzh(R't_langtitemsRRRRR>(RtrestcodetlangRKts((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pytgetLanguageInformations+(	R
RR
R R8R:RCRORW(((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyR"Gs			
	t__main__(t
LocaleInfos/usr/share/language-selectortlanguagelistsavailable language informations, s%s(twarningstfilterwarningst
FutureWarningR#R(tobjectRRt	ExceptionR!R$R"R
RYtdatadirRKR,t
OpProgresstlctjoinRWtx(((s>/usr/lib/python2.7/dist-packages/LanguageSelector/LangCache.pyt<module>s/H