Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/dnf-plugins/
Upload File :
Current File : //lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyo

�
	i/\c@`s5ddlmZddlmZddlmZddlmZddlmZmZddlZddl	Zddl
Z
ddlZddlZddl
Z
d�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zdefd��YZdefd��YZejjdejjfd��Y�ZdS(i(tabsolute_import(tdivision(tprint_function(tunicode_literals(tloggert_Ncc`s�x�t�D]�\}}yL|dk	r=|t|�kr=w
nt|d��}|j�}WdQXWn$tk
r�tjd|�q
nXx1|D])}t||�}|dk	r�|Vq�q�Wq
WdS(NuruFailed to read PID %d's smaps.(	t
list_smapstNonet	owner_uidtopent	readlinestEnvironmentErrorRtwarningtsmap2opened_file(tuidtpidtsmapst
smaps_filetlinestlinetofile((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pytlist_opened_files&s

cc`sZxStjd�D]B}yt|�}Wntk
r<qnXd|}||fVqWdS(Nu/procu/proc/%d/smaps(tostlistdirtintt
ValueError(tdir_RR((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyR7s

c`s(t��i����fd�}|S(Nc`s<�j|��}|�k	r"|S�|�}|�|<|S(N(tget(tparamtval(tcachetfunctsentinel(s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pytwrapperDs
(tobject(RR!((RRR s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pytmemoizeAs	cC`stj|�tjS(N(RtstattST_UID(tfname((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyRNscC`s0|j�jd|�j�}|r,|dSdS(Ntfilei(tquerytfiltertrunR(tsackR&tmatches((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pytowning_packageRscC`sgd|}t|��}tjj|j��}WdQXdj|jd��}td||f�dS(Nu/proc/%d/cmdlineu uu%d : %s(R	tdnfti18ntucdtreadtjointsplittprint(Rtcmdlinetcmdline_filetcommand((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt	print_cmdYs

cC`s�|jd�}|dkrdS|jd�dkr8dS||j�}|jd�}|dkrst||t�St||| t�SdS(Nu/iu00:u
 (deleted)(tfindRtstriptrfindt
OpenedFiletFalsetTrue(RRtslashtfntsuffix_index((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyR
asR<cB`s/eZejd�Zd�Zed��ZRS(u^(.+);[0-9A-Fa-f]{8,}$cC`s||_||_||_dS(N(tdeletedtnameR(tselfRRCRB((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt__init__ss		cC`s;|jr4|jj|j�}|r4|jd�Sn|jS(u;Calculate the name of the file pre-transaction.

        In case of a file that got deleted during the transactionm, possibly
        just because of an upgrade to a newer version of the same file, RPM
        renames the old file to the same name with a hexadecimal suffix just
        before delting it.

        i(RBtRE_TRANSACTION_FILEtmatchRCtgroup(RDRG((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt
presumed_namexs
	(t__name__t
__module__tretcompileRFREtpropertyRI(((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyR<ps	tProcessStartcB`s8eZd�Zed��Zed��Zd�ZRS(cC`s"|j�|_|j�|_dS(N(t
get_boot_timet	boot_timetget_sc_clk_tckt
sc_clk_tck(RD((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyRE�sc	C`s\td��J}x@|j�D]2}|jd�s7qnt|td�j��SWWdQXdS(Nu
/proc/statubtime (R	R
t
startswithRtlenR:(t	stat_fileR((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyRP�s
cC`stjtjd�S(Nu
SC_CLK_TCK(Rtsysconft
sysconf_names(((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyRR�scC`s_d|}t|��}|j�j�j�}WdQXt|d�}||j}|j|S(Nu
/proc/%d/stati(R	R1R:R3RRSRQ(RDRtstat_fnRVtstatstticks_after_boottsecs_after_boot((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt__call__�s

(RJRKREtstaticmethodRPRRR](((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyRO�s	tNeedsRestartingCommandcB`s;eZdZed�Zed��Zd�Zd�ZRS(uneeds-restartingu/determine updated binaries that need restartingcC`s&|jdddddtd��dS(Nu-uu
--useronlytactionu
store_truethelpu#only consider this user's processes(tadd_argumentR(tparser((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt
set_argparser�scC`s|jj}t|_dS(N(tclitdemandsR>tsack_activation(RDRf((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt	configure�scC`s�t�}tjt|jj�}t|�}t�}|jj	rNt
j�nd}x`t
|�D]R}||j�}|dkr�qan|j||j�kra|j|j�qaqaWxt|�D]}t|�q�WdS(N(ROt	functoolstpartialR-tbaseR+R#tsettoptstuseronlyRtgeteuidRRRItinstalltimeRtaddtsortedR8(RDt
process_startt
owning_pkg_fnt
stale_pidsRRtpkgR((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyR*�s		(uneeds-restarting(	RJRKtaliasesRtsummaryR^RdRhR*(((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyR_�s
	(t
__future__RRRRtdnfpluginscoreRRR.tdnf.cliRiRRLR$RRR#RR-R8R
R"R<ROtplugintregister_commandRetCommandR_(((s@/usr/lib/python2.7/site-packages/dnf-plugins/needs_restarting.pyt<module>s*		
	
				

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]