catch IOError on traceback.print_exc
This commit is contained in:
parent
ec8f683b3f
commit
109f599865
1 changed files with 12 additions and 3 deletions
|
@ -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)
|
||||||
traceback.print_exc()
|
try:
|
||||||
|
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:'))
|
||||||
traceback.print_exc()
|
try:
|
||||||
|
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:'))
|
||||||
traceback.print_exc()
|
try:
|
||||||
|
traceback.print_exc()
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
self.connection = None
|
self.connection = None
|
||||||
# END Connection
|
# END Connection
|
||||||
|
|
Loading…
Add table
Reference in a new issue