def _set_error(self, error): text = MUC_DISCO_ERRORS.get(error.condition, to_user_string(error)) if error.condition == 'gone': reason = error.get_text(get_rfc5646_lang()) if reason: text = '%s:\n%s' % (text, reason) self._show_error_page(text)
def _set_warning_from_error(self, error): text = MUC_DISCO_ERRORS.get(error.type, str(error)) self._set_warning(text)
def _set_warning_from_error(self, error): condition = error.condition if condition == 'gone': condition = 'already-exists' text = MUC_DISCO_ERRORS.get(condition, to_user_string(error)) self._set_warning(text)
def _set_error(self, error): text = MUC_DISCO_ERRORS.get(error.type, str(error)) self._show_error_page(text)