Changeset 9609

Show
Ignore:
Timestamp:
05/11/08 00:22:09 (2 months ago)
Author:
js
Message:

Fix broken exception handling for OTR in connection.py.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/common/connection.py

    r9607 r9609  
    171171                        try: 
    172172                                gajim.otr_module.otrl_privkey_read(self.otr_userstates, 
    173                                         os.path.join(gajimpaths.root, 
     173                                        os.path.join(gajim.gajimpaths.root, 
    174174                                        '%s.key' % self.name).encode()) 
    175                         except Exception, e: 
    176                                 if hasattr(e, 'os_errno') and e.os_errno == 2: 
    177                                         pass 
    178  
    179                         try: 
    180175                                gajim.otr_module.otrl_privkey_read_fingerprints( 
    181176                                        self.otr_userstates, os.path.join( 
    182                                         gajimpaths.root, '%s.fpr' % self.name 
    183                                         ).encode(), (add_appdata, a)) 
     177                                        gajim.gajimpaths.root, '%s.fpr' % 
     178                                        self.name).encode(), 
     179                                        (gajim.otr_add_appdata, self.name)) 
    184180                        except Exception, e: 
    185                                 if hasattr(e, 'os_errno') and e.os_errno == 2: 
    186                                         pass 
     181                                if not hasattr(e, 'os_errno') or e.os_errno != 2: 
     182                                        raise 
    187183        # END __init__ 
    188184