Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyc


Tc@sddlZddlZddlZddlmZmZdZdZdZdej	fdYZ
defd	YZdS(
iN(tPolicyKitMechanismtPOLICY_NAMEs%com.canonical.LandscapeClientSettingss<com.canonical.LandscapeClientSettings.ConfigurationInterfaces=/com/canonical/LandscapeClientSettings/ConfigurationInterfacetPermissionDeniedByPolicycBseZdZRS(s>com.canonical.LandscapeClientSettings.PermissionDeniedByPolicy(t__name__t
__module__t_dbus_error_name(((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyRstConfigurationMechanismc
BseZdZeddZejje	dddddddd	ddd
Z
ejje	dddddddd	dddZejje	dddddddd	dddZejje	dddd
dddd	dddZ
ejje	dd
dd
dddd	dddZejje	dddddddd	dddZejje	dddddddd	dddZRS(sj
    L{ConfigurationMechanism} provides access to the
    L{LandscapeSetupConfiguration} object via DBus with access control
    implemented via PolicyKit policy.  The use of DBus results from the use of
    PolicyKit, not the other way around, and is done that way because that is
    considered to be the Right Thing for Ubuntu Desktop circa January 2012.
    cCs5tt|jt|td|d|||_dS(Ntbypasstconn(tsuperRt__init__tOBJECT_PATHRt_config(tselftconfigtbus_nameRR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR
s
tin_signaturetast
out_signaturettsender_keywordtsendertconnection_keywordRcCs`|j||tr\t|dkrI|jj|jtdq\|jjgndS(Nii(t_is_allowed_by_policyRtlenRtloadtsplittchr(R
targlistRR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR"s
"cCs)|j||tr%|jjndS(N(RRRtreload(R
RR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR/scCs)|j||tr%|jjndS(N(RRRtwrite(R
RR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR6stscCs
|jjS(N(Rtget_config_filename(R
RR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR =scCs^|j||trZy|jj|}Wntk
r?dSX|dkrPdSt|SdS(s
        Return the configuration option value associated with L{name} from the
        L{LandscapeSetupConfiguration}.
        RN(RRRtgettAttributeErrortNonetstr(R
tnameRRtvalue((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR!Es


tsscCsJ|j||trFt|jddd}t|j||ndS(s
        Set the configuration option associated with L{name} to L{value} in the
        L{LandscapeSetupConfiguration}.
        tasciiterrorstreplaceN(RRtunicodetencodetsetattrR(R
R%R&RR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pytsetYs
cCstjddS(s$
        Exit this process.
        iN(tsystexit(R
RR((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyR0hs	N(RRt__doc__tFalseR#R
tdbustservicetmethodtINTERFACE_NAMERRRR R!R.R0(((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyRsP
(R/R3tdbus.servicetlandscape.ui.lib.polkitRRtSERVICE_NAMER6Rt
DBusExceptionRR(((sN/usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/mechanism.pyt<module>s