Exemple #1
0
     def eb(failure):
         if not hasattr(failure, 'shown'):
             msg = log.getFailureMessage(failure)
             ew = error.ErrorWindow(msg)
 
             ew.show_all()
             failure.shown = True
Exemple #2
0
        def _eb(failure):
            msg = log.getFailureMessage(failure)
            self.debug(msg)

            hildon.hildon_gtk_window_set_progress_indicator(lw, 0)
            ew = error.ErrorWindow(msg)
    
            ew.show_all()
Exemple #3
0
    def _handle_failure_eb(self, failure, window):
        # only show one error dialog by setting a shown attribute on failure
        hildon.hildon_gtk_window_set_progress_indicator(window, 0)
        print failure
        msg = log.getFailureMessage(failure)

        self.debug(msg)

        from twisted.internet import error as tierror
        if failure.check(tierror.ConnectionRefusedError):
            msg = 'Fatal error: CouchDB is not running.'

        if not hasattr(failure, 'shown'):
            ew = error.ErrorWindow(msg)
    
            ew.show_all()
            failure.shown = True

        # close previous things window
        window.destroy()

        raise failure
Exemple #4
0
 def _saveDoc_eb(failure):
     self.debug('failure adding thing %r: %r',
         thing, log.getFailureMessage(failure))
     return failure