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()
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()
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
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