def _on_exit(self, trans, exit): if exit == EXIT_FAILED: d = AptErrorDialog(trans.get_error(), parent=self.window_main) d.run() d.hide()