catch IOError on traceback.print_exc

This commit is contained in:
Nikos Kouremenos 2005-11-19 15:49:45 +00:00
parent ec8f683b3f
commit 109f599865

View file

@ -1556,7 +1556,10 @@ class Connection:
'weight': weight}) 'weight': weight})
except: except:
gajim.log.debug('An error occurred while looking up %s:' % query) gajim.log.debug('An error occurred while looking up %s:' % query)
try:
traceback.print_exc() traceback.print_exc()
except IOError:
pass
# end of SRV resolver # end of SRV resolver
if len(hosts) == 0: # SRV fails or misconfigred on the server if len(hosts) == 0: # SRV fails or misconfigred on the server
@ -2300,7 +2303,10 @@ class Connection:
self.connection.Process(timeout) self.connection.Process(timeout)
except: except:
gajim.log.debug(_('A protocol error has occured:')) gajim.log.debug(_('A protocol error has occured:'))
try:
traceback.print_exc() traceback.print_exc()
except IOError:
pass
self.connected = 0 self.connected = 0
self.dispatch('STATUS', 'offline') self.dispatch('STATUS', 'offline')
if not self.connection: if not self.connection:
@ -2309,6 +2315,9 @@ class Connection:
self.connection.disconnect() self.connection.disconnect()
except: except:
gajim.log.debug(_('A protocol error has occured:')) gajim.log.debug(_('A protocol error has occured:'))
try:
traceback.print_exc() traceback.print_exc()
except IOError:
pass
self.connection = None self.connection = None
# END Connection # END Connection