Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
aa3cc79e
by Philipp Hörist at 2019-08-19T21:08:14Z
3 changed files:
Changes:
| ... | ... | @@ -18,6 +18,7 @@ import nbxmpp |
| 18 | 18 |
from nbxmpp.structs import StanzaHandler
|
| 19 | 19 |
|
| 20 | 20 |
from gajim.common import app
|
| 21 |
+from gajim.common.helpers import to_user_string
|
|
| 21 | 22 |
from gajim.common.nec import NetworkEvent
|
| 22 | 23 |
from gajim.common.file_props import FilesProp
|
| 23 | 24 |
from gajim.common.modules.base import BaseModule
|
| ... | ... | @@ -51,7 +52,7 @@ class Iq(BaseModule): |
| 51 | 52 |
conn=self._con,
|
| 52 | 53 |
jid=properties.jid.getBare(),
|
| 53 | 54 |
file_props=file_props,
|
| 54 |
- error_msg=properties.error.get_text()))
|
|
| 55 |
+ error_msg=to_user_string(properties.error)))
|
|
| 55 | 56 |
self._con.get_module('Bytestream').disconnect_transfer(file_props)
|
| 56 | 57 |
raise nbxmpp.NodeProcessed
|
| 57 | 58 |
|
| ... | ... | @@ -350,7 +350,7 @@ class MUC(BaseModule): |
| 350 | 350 |
NetworkEvent('muc-captcha-error',
|
| 351 | 351 |
account=self._account,
|
| 352 | 352 |
room_jid=room_jid,
|
| 353 |
- error_text=properties.error.get_text()))
|
|
| 353 |
+ error_text=to_user_string(properties.error)))
|
|
| 354 | 354 |
self._set_muc_state(room_jid, MUCJoinedState.CAPTCHA_FAILED)
|
| 355 | 355 |
self._set_muc_state(room_jid, MUCJoinedState.NOT_JOINED)
|
| 356 | 356 |
|
| ... | ... | @@ -57,6 +57,7 @@ from gajim.common import events |
| 57 | 57 |
from gajim.common import app
|
| 58 | 58 |
from gajim.common import helpers
|
| 59 | 59 |
from gajim.common.helpers import event_filter
|
| 60 |
+from gajim.common.helpers import to_user_string
|
|
| 60 | 61 |
from gajim.common import ged
|
| 61 | 62 |
from gajim.common.i18n import _
|
| 62 | 63 |
from gajim.common import contacts
|
| ... | ... | @@ -1945,13 +1946,13 @@ class GroupchatControl(ChatControlBase): |
| 1945 | 1946 |
|
| 1946 | 1947 |
@event_filter(['account', 'room_jid'])
|
| 1947 | 1948 |
def _on_muc_join_failed(self, event):
|
| 1948 |
- self.xml.error_label.set_text(event.error.get_text())
|
|
| 1949 |
+ self.xml.error_label.set_text(to_user_string(event.error))
|
|
| 1949 | 1950 |
self._show_page('error')
|
| 1950 | 1951 |
self.autorejoin = False
|
| 1951 | 1952 |
|
| 1952 | 1953 |
@event_filter(['account', 'room_jid'])
|
| 1953 | 1954 |
def _on_presence_error(self, event):
|
| 1954 |
- error_message = event.properties.error.get_text()
|
|
| 1955 |
+ error_message = to_user_string(event.properties.error)
|
|
| 1955 | 1956 |
self.add_info_message('Error: %s' % error_message)
|
| 1956 | 1957 |
|
| 1957 | 1958 |
def add_contact_to_roster(self, nick):
|