Beispiel #1
0
    def _change_warebox_path(self, new_warebox):
        """Set a new folder as the warebox.

        @param new_warebox:
                    Absolute filesystem pathname of the directory that
                    will be the new warebox.
        """
        self.cfg.set('Application Paths', 'warebox_path', new_warebox)
        self.cfg.write_to_file()
        self._metadata_db.set('last_warebox_path',
                              self.cfg.get('Application Paths', 'warebox_path'))
        warebox = Warebox(self.cfg)
        CryptoUtils.recreate_encrypted_dir(warebox, self.logger)
        self._clean_env()
Beispiel #2
0
    def _change_warebox_path(self, new_warebox):
        """Set a new folder as the warebox.

        @param new_warebox:
                    Absolute filesystem pathname of the directory that
                    will be the new warebox.
        """
        self.cfg.set('Application Paths', 'warebox_path', new_warebox)
        self.cfg.write_to_file()
        self._metadata_db.set(
            'last_warebox_path',
            self.cfg.get('Application Paths', 'warebox_path'))
        warebox = Warebox(self.cfg)
        CryptoUtils.recreate_encrypted_dir(warebox, self.logger)
        self._clean_env()
Beispiel #3
0
    def check_precondition(self, ui):
        """
        Checks the presence of encryption dir, and eventually recreates it

        @param ui: the ui interface class
        """
        encryptedDir = self.warebox.absolute_pathname('encrypted')
        result = True
        if not os.path.exists(encryptedDir) or os.path.isfile(encryptedDir):
            result = CryptoUtils.recreate_encrypted_dir(self.warebox, self.logger, ui)
        return result
Beispiel #4
0
    def check_precondition(self, ui):
        """
        Checks the presence of encryption dir, and eventually recreates it

        @param ui: the ui interface class
        """
        encryptedDir = self.warebox.absolute_pathname('encrypted')
        result = True
        if not os.path.exists(encryptedDir) or os.path.isfile(encryptedDir):
            result = CryptoUtils.recreate_encrypted_dir(
                self.warebox, self.logger, ui)
        return result