summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2011-08-12 21:24:28 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2011-08-12 21:24:28 +0200
commit12bcb9235f6616e421b3c28d3f8b820ad9fe75a3 (patch)
tree0ed016e6c28c929decca730de02ed4b717b21d7a /src
parent94436e075b680617340884fb3dd870bcef6826e5 (diff)
downloadpoezio-12bcb9235f6616e421b3c28d3f8b820ad9fe75a3.tar.gz
poezio-12bcb9235f6616e421b3c28d3f8b820ad9fe75a3.tar.bz2
poezio-12bcb9235f6616e421b3c28d3f8b820ad9fe75a3.tar.xz
poezio-12bcb9235f6616e421b3c28d3f8b820ad9fe75a3.zip
Display the JID of an error sender. Fixes #2218.
Diffstat (limited to 'src')
-rw-r--r--src/core.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index e159029a..242b22a6 100644
--- a/src/core.py
+++ b/src/core.py
@@ -873,6 +873,7 @@ class Core(object):
Takes a stanza of the form <message type='error'><error/></message>
and return a well formed string containing the error informations
"""
+ sender = stanza.attrib['from']
msg = stanza['error']['type']
condition = stanza['error']['condition']
code = stanza['error']['code']
@@ -883,9 +884,9 @@ class Core(object):
else:
body = condition or _('Unknown error')
if code:
- message = _('Error: %(code)s - %(msg)s: %(body)s') % {'msg':msg, 'body':body, 'code':code}
+ message = _('%(from)s: %(code)s - %(msg)s: %(body)s') % {'from':sender, 'msg':msg, 'body':body, 'code':code}
else:
- message = _('Error: %(msg)s: %(body)s') % {'msg':msg, 'body':body}
+ message = _('%(from)s: %(msg)s: %(body)s') % {'from':sender, 'msg':msg, 'body':body}
return message
def room_error(self, error, room_name):