def eb(failure): if not hasattr(failure, 'shown'): msg = log.getFailureMessage(failure) ew = error.ErrorWindow(msg) ew.show_all() failure.shown = True
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()
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
def _saveDoc_eb(failure): self.debug('failure adding thing %r: %r', thing, log.getFailureMessage(failure)) return failure