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: 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):