def backup(self, path): if not os.path.isdir(path): raise Error, 'arguement needs to be a directory' pdb = PaellaDatabase(self.conn, path) pdb.backup(path) mh = MachineHandler(self.conn) mh.export_machine_database(path)
def backup(self, path): if not os.path.isdir(path): raise Error, 'arguement needs to be a directory' pdb = PaellaDatabase(self.conn, path) pdb.backup(path) mdbpath = join(path, 'machine_database.xml') me = MachineDatabaseElement(self.conn) mdfile = file(mdbpath, 'w') mdfile.write(me.toprettyxml()) mdfile.close()
def ask_dialog(self, button, data): if not self.dialogs[data]: if data == 'create': self.dialogs[data] = dialogs.Entry('create profile', name='create') self.dialogs[data].set_ok(self.create_profile) elif data == 'copy': self.dialogs[data] = dialogs.CList('copy profile', name='copy') dialog = self.dialogs[data] dialog.set_rows( self.profiles.select(fields='profile', order='profile')) dialog.set_ok(self.src_profile_selected) elif data == 'export': pdb = PaellaDatabase(self.conn) profiles = pdb.profiles self.dialogs[data].set_cancel(self.destroy_dialog)