def on_scan_finished(self, scanner): # GLib.idle_add(self._on_scan_finished) if self.progreso_dialog is not None: self.progreso_dialog.destroy() self.progreso_dialog = None md = Gtk.MessageDialog(parent=self) md.set_title('Antiviral') md.set_property('message_type', Gtk.MessageType.INFO) md.add_button(Gtk.STOCK_OK, Gtk.ResponseType.ACCEPT) md.set_property('text', _('Antiviral')) if len(self.infected) > 0: md.format_secondary_text( _('What a pity!, In this machine there are viruses!')) md.run() md.destroy() actions = Actions(self, self.infected) actions.run() actions.destroy() else: md.format_secondary_text(_('Congratulations!!, no viruses found')) md.run() md.destroy()
def do_destroy(self, arg): """Deletes an instance based on the class name and id""" arg = HBNBCommand.parse_argument(arg) Actions.destroy(arg)