Fix broken exception handling for OTR in connection.py.

This commit is contained in:
js 2008-05-10 22:22:09 +00:00
parent da75967560
commit e335055709
1 changed files with 6 additions and 10 deletions

View File

@ -170,20 +170,16 @@ class Connection(ConnectionHandlers):
try:
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())
except Exception, e:
if hasattr(e, 'os_errno') and e.os_errno == 2:
pass
try:
gajim.otr_module.otrl_privkey_read_fingerprints(
self.otr_userstates, os.path.join(
gajimpaths.root, '%s.fpr' % self.name
).encode(), (add_appdata, a))
gajim.gajimpaths.root, '%s.fpr' %
self.name).encode(),
(gajim.otr_add_appdata, self.name))
except Exception, e:
if hasattr(e, 'os_errno') and e.os_errno == 2:
pass
if not hasattr(e, 'os_errno') or e.os_errno != 2:
raise
# END __init__
def put_event(self, ev):