Current Path : /usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/ |
Current File : //usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyc |
Tc @ sX d Z d d l Z d d l m Z m Z m Z d d l m Z d e f d YZ d S( s This module contains a class, L{ConfigurationProxy} which pretends to be a L{landscape.configuration.LandscapeSetupConfiguration} but actually directs its calls via DBus to the L{ConfigurationMechanism}. iN( t SERVICE_NAMEt INTERFACE_NAMEt OBJECT_PATH( t LandscapeSetupConfigurationt ConfigurationProxyc B s7 e Z d Z d d g d Z d Z e j j e _ d Z e j j e _ d Z e j j e _ d Z e j j e _ e d Z d Z e e d Z e e d Z e e d Z e e d Z e e d Z e e d Z e e d Z e e d Z e e d Z RS( s L{ConfigurationProxy} attempts to be a drop-in replacement for L{LandscapeSetupConfiguration} allowing applications run by user accounts with the correct rights (as defined by a PolicyKit policy file) to interact with the landscape client configuration via a DBus service. This is the RightThing(TM) for PolicyKit and therefore for GNOME/Unity. The canonical case for this is L{landscape-client-settings-ui}. c C sv | | _ | d k r' t j | _ n | | _ | d k ri | j j t t } t j | t | _ n | | _ d S( N( t _loadargst Nonet dbust SystemBust _bust get_objectR R t InterfaceR t _interface( t selft bust interfacet loadargst remote_object( ( sJ /usr/lib/python2.7/dist-packages/landscape/ui/model/configuration/proxy.pyt __init__ s c C s | d k r | j } n t | d k r3 d } n t d j | } y | j j | Wn5 t j k r } | j } | d k r n t SXt S( Ni t i s>