MINI MINI MANI MO

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

ó
©=[c@s>ddlZddlZejjƒZddd„ƒYZdS(iÿÿÿÿNtpolkitcBseZd„Zd„ZRS(cCsLtjƒ|_|jjdddtƒ|_tj|jddƒ|_dS(Nsorg.freedesktop.PolicyKit1s%/org/freedesktop/PolicyKit1/Authoritytfollow_name_owner_changestdbus_interfaces$org.freedesktop.PolicyKit1.Authority(tdbust	SystemBust_bust
get_objecttTruet_proxyt	Interfacet
_authority(tself((s6/usr/lib/python2.7/site-packages/tuned/utils/polkit.pyt__init__sc
Cs|dks|dkrtSi}d}d}di|d6f}y&|jj|||||ƒd}Wnˆtjjtfk
rñ}tj	d|ƒy|j
j|ƒ}	Wn+tjjk
rÙ}tj	d|ƒdSX|	dkrêd	Sd
SnX|rüdSdS(sÿCheck authorization, return codes:
			1  - authorized
			2  - polkit error, but authorized with fallback method
			0  - unauthorized
			-1 - polkit error and unauthorized by the fallback method
			-2 - polkit error and unable to use the fallback method
		itssystem-bus-nametnameiserror querying polkit: %ss,error using falback authorization method: %siþÿÿÿiiÿÿÿÿN(tNonetFalseR
tCheckAuthorizationRt
exceptionst
DBusExceptiont
ValueErrortlogterrorRt
get_unix_user(
Rtsendert	action_idtdetailstflagstcancellation_idtsubjecttrettetuid((s6/usr/lib/python2.7/site-packages/tuned/utils/polkit.pytcheck_authorizations&	&(t__name__t
__module__RR!(((s6/usr/lib/python2.7/site-packages/tuned/utils/polkit.pyRs	((Rt
tuned.logsttunedtlogstgetRR(((s6/usr/lib/python2.7/site-packages/tuned/utils/polkit.pyt<module>s

OHA YOOOO