frontends: async failures are more detailed (full class name + error message)

This commit is contained in:
souliane 2014-06-07 15:39:20 +02:00
commit a5dd35ce65
8 changed files with 18 additions and 20 deletions

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from sat.core.i18n import _, languageSwitch
from sat.core.i18n import _, D_, languageSwitch
from twisted.application import service
from twisted.internet import defer
from twisted.words.protocols.jabber import jid
@ -298,7 +298,7 @@ class SAT(service.Service):
def check_result(result):
if not result:
log.warning(_('Authentication failure of profile %s') % profile)
raise exceptions.PasswordError(_("The provided profile password doesn't match."))
raise exceptions.PasswordError(D_("The provided profile password doesn't match."))
if not session_data: # avoid to create two profile sessions when password if specified
return self.memory.newAuthSession(password, profile)

View file

@ -80,7 +80,7 @@ class ProfileManager(object):
def getParamError(self):
_dialog = xml_tools.XMLUI('popup', title=D_('Error'))
_dialog.addText(_("Can't get profile parameter."))
_dialog.addText(D_("Can't get profile parameter."))
return {'xmlui': _dialog.toXml()}
@defer.inlineCallbacks