From 109f5998652210f4c5a224e501b1270ec20d244e Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sat, 19 Nov 2005 15:49:45 +0000 Subject: [PATCH] catch IOError on traceback.print_exc --- src/common/connection.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 08fb4dc67..6aa101627 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1556,7 +1556,10 @@ class Connection: 'weight': weight}) except: 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 if len(hosts) == 0: # SRV fails or misconfigred on the server @@ -2300,7 +2303,10 @@ class Connection: self.connection.Process(timeout) except: gajim.log.debug(_('A protocol error has occured:')) - traceback.print_exc() + try: + traceback.print_exc() + except IOError: + pass self.connected = 0 self.dispatch('STATUS', 'offline') if not self.connection: @@ -2309,6 +2315,9 @@ class Connection: self.connection.disconnect() except: gajim.log.debug(_('A protocol error has occured:')) - traceback.print_exc() + try: + traceback.print_exc() + except IOError: + pass self.connection = None # END Connection