Fix broken exception handling for OTR in connection.py.
This commit is contained in:
parent
da75967560
commit
e335055709
|
@ -170,20 +170,16 @@ class Connection(ConnectionHandlers):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gajim.otr_module.otrl_privkey_read(self.otr_userstates,
|
gajim.otr_module.otrl_privkey_read(self.otr_userstates,
|
||||||
os.path.join(gajimpaths.root,
|
os.path.join(gajim.gajimpaths.root,
|
||||||
'%s.key' % self.name).encode())
|
'%s.key' % self.name).encode())
|
||||||
except Exception, e:
|
|
||||||
if hasattr(e, 'os_errno') and e.os_errno == 2:
|
|
||||||
pass
|
|
||||||
|
|
||||||
try:
|
|
||||||
gajim.otr_module.otrl_privkey_read_fingerprints(
|
gajim.otr_module.otrl_privkey_read_fingerprints(
|
||||||
self.otr_userstates, os.path.join(
|
self.otr_userstates, os.path.join(
|
||||||
gajimpaths.root, '%s.fpr' % self.name
|
gajim.gajimpaths.root, '%s.fpr' %
|
||||||
).encode(), (add_appdata, a))
|
self.name).encode(),
|
||||||
|
(gajim.otr_add_appdata, self.name))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if hasattr(e, 'os_errno') and e.os_errno == 2:
|
if not hasattr(e, 'os_errno') or e.os_errno != 2:
|
||||||
pass
|
raise
|
||||||
# END __init__
|
# END __init__
|
||||||
|
|
||||||
def put_event(self, ev):
|
def put_event(self, ev):
|
||||||
|
|
Loading…
Reference in New Issue