Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::evolution::Evolution::backup_config (   self  ) 

It saves the configuration of Evolution in a file
called ~/.evo.bak.tar.gz{.n}

It saves the evolution config & messages

Definition at line 192 of file evolution.py.

00192                            :
        """
        It saves the configuration of Evolution in a file
        called ~/.evo.bak.tar.gz{.n}

        It saves the evolution config & messages
        """
        p = os.path.expanduser('~/.evo.bak.tar.gz')
        backup_path = p
        i = 2
        while os.path.exists(backup_path):
            backup_path = '%s.%d' % (p, i)
            i += 1
            
        try:
            tar = tarfile.open(backup_path, mode='w:gz')
            evolution_conf = os.path.expanduser('~/.evolution')
            evolution_gconf = os.path.expanduser('~/.gconf/apps/evolution')

            if os.path.exists(evolution_conf):
                tar.add(evolution_conf)
                rmtree(evolution_conf)
            if os.path.exists(evolution_gconf):
                tar.add(evolution_gconf)
                rmtree(evolution_gconf)
            tar.close()
        except IOError:
            pass
        else:
            self.backup_path = backup_path

        # Shutdown processes related to the evolution configuration
        os.popen("evolution --force-shutdown")
        os.popen("gconftool-2 --shutdown")
        
    def restore_config(self):


Generated by  Doxygen 1.6.0   Back to index