Пример #1
0
 def get_committing_client_and_address (self, mandatory):
     if not mandatory:
         if not self.defaults_client:
             (client, address) = gconfsource.get_client_and_address_for_path (
                 os.path.join (self.temp_path, GCONF_DEFAULTS_SOURCE))
             self.defaults_client = client
             self.defaults_address = address
         return (self.defaults_client, self.defaults_address)
     else:
         if not self.mandatory_client:
             (client, address) = gconfsource.get_client_and_address_for_path (
                 os.path.join (self.temp_path, GCONF_MANDATORY_SOURCE))
             self.mandatory_client = client
             self.mandatory_address = address
         return (self.mandatory_client, self.mandatory_address)
Пример #2
0
 def get_committing_client_and_address (self, mandatory):
     if not mandatory:
         if not self.defaults_client:
             (client, address) = gconfsource.get_client_and_address_for_path (
                 os.path.join (self.temp_path, ".gconf.xml.defaults"))
             self.defaults_client = client
             self.defaults_address = address
         return (self.defaults_client, self.defaults_address)
     else:
         if not self.mandatory_client:
             (client, address) = gconfsource.get_client_and_address_for_path (
                 os.path.join (self.temp_path, ".gconf.xml.mandatory"))
             self.mandatory_client = client
             self.mandatory_address = address
         return (self.mandatory_client, self.mandatory_address)
Пример #3
0
 def _copy_tree (self, dir):
     if not self.gconf_client.dir_exists(dir):
         (src_client, src_address) = gconfsource.get_client_and_address_for_path (os.path.join (util.get_home_dir (), '.gconf'))
         (dst_client, dst_address) = gconfsource.get_client_and_address_for_path (os.path.join (util.get_home_dir (), GCONF_DEFAULTS_SOURCE))
         copy_dir (src_client, dst_client, dst_address, dir)