Beispiel #1
0
 def _error_handler(self, error):
     try:
         raise error
     except NotAuthorizedError:
         # Silently ignore auth failures
         self.emit('auth-failed')
         return
     except TransactionFailed as error:
         pass
     except Exception as error:
         error = TransactionFailed(ERROR_UNKNOWN, str(error))
     dia = AptErrorDialog(error)
     dia.run()
     dia.destroy()
Beispiel #2
0
 def _on_exit(self, trans, exit):
     if exit == EXIT_FAILED:
         d = AptErrorDialog(trans.get_error(), parent=self.window_main)
         d.run()
         d.hide()
Beispiel #3
0
        else:
            error = None
        self.emit('done', error)

    def _error_handler(self, error):
        try:
            raise error
        except NotAuthorizedError:
            # Silently ignore auth failures
            self.emit('auth-failed')
            return
        except TransactionFailed, error:
            pass
        except Exception, error:
            error = TransactionFailed(ERROR_UNKNOWN, str(error))
        dia = AptErrorDialog(error)
        dia.run()
        dia.destroy()

    def _confirm(self):
        from aptdaemon.gtkwidgets import AptConfirmDialog
        dia = AptConfirmDialog(self._transaction,
                               parent=self.parent)
        response = dia.run()
        dia.destroy()
        if response == gtk.RESPONSE_OK:
            self._install()

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