diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2017-01-23 19:59:32 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2017-01-24 20:35:43 +0300 |
commit | ab4eeae934e6e72f4c62a07f9e9a2bc8382d6fba (patch) | |
tree | b0c130b054fe14bc715844f8c5df7c49f0c0aa74 /gotr | |
parent | b299827ab5f7b3ba4fe0832d8483be20d4f4a9dd (diff) |
[gotr] Fix AttibuteError bug in get_control
gotr expects fjid to be str, but it can be nbxmpp.JID. Converting to str
shouldn't hurt, although could as well call fjid.getStripped() instead
of gajim.get_jid_without_resource.
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/gajim/common/ged.py", line 93, in raise_event
if handler(*args, **kwargs):
File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 564, in handle_incoming_msg
appdata={'thread':event.session.thread_id if event.session else None})
File "/home/livid/.local/share/gajim/plugins/gotr/potr/context.py", line 210, in receiveMessage
self.crypto.handleAKE(message, appdata=appdata)
File "/home/livid/.local/share/gajim/plugins/gotr/potr/crypt.py", line 282, in handleAKE
outMsg = self.ake.handleRevealSig(inMsg)
File "/home/livid/.local/share/gajim/plugins/gotr/potr/crypt.py", line 420, in handleRevealSig
self.onSuccess(self)
File "/home/livid/.local/share/gajim/plugins/gotr/potr/crypt.py", line 316, in goEncrypted
self.ctx._wentEncrypted()
File "/home/livid/.local/share/gajim/plugins/gotr/potr/context.py", line 313, in _wentEncrypted
self.setState(STATE_ENCRYPTED)
File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 175, in setState
OtrPlugin.update_otr(self.peer, self.user.accountname)
File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 521, in update_otr
ctrl = cls.get_control(user, acc)
File "/home/livid/.local/share/gajim/plugins/gotr/otrmodule.py", line 535, in get_control
gajim.get_jid_without_resource(fjid), account)
File "/usr/lib64/python2.7/site-packages/gajim/common/gajim.py", line 297, in get_jid_without_resource
return jid.split('/')[0]
AttributeError: JID instance has no attribute 'split'
Diffstat (limited to 'gotr')
-rw-r--r-- | gotr/otrmodule.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gotr/otrmodule.py b/gotr/otrmodule.py index a61b522..1eb38b4 100644 --- a/gotr/otrmodule.py +++ b/gotr/otrmodule.py @@ -530,7 +530,7 @@ class OtrPlugin(GajimPlugin): # otherwise try without the resource ctrl = gajim.interface.msg_win_mgr.get_control( - gajim.get_jid_without_resource(fjid), account) + gajim.get_jid_without_resource(str(fjid)), account) # but only use it when it's not a GC window if ctrl and ctrl.TYPE_ID == TYPE_CHAT: return ctrl |