# HG changeset patch # User Brendan Cully # Date 1266627047 28800 # Node ID 1426b4807fc8abdfb139f520aaeb481e73a66b55 # Parent 47838dee7d60711bd4f3d3af9abb18088d40443f zeroconf: suppress traceback during shutdown If the read thred is in select when the main thread is in close, the main thread may close the socket between select and read, generating a noisy traceback. This can be ignored if the shutdown flag is set. diff -r 47838dee7d60 -r 1426b4807fc8 hgext/zeroconf/Zeroconf.py --- a/hgext/zeroconf/Zeroconf.py Fri Feb 19 21:48:09 2010 +0100 +++ b/hgext/zeroconf/Zeroconf.py Fri Feb 19 16:50:47 2010 -0800 @@ -863,7 +863,8 @@ try: self.readers[socket].handle_read() except: - traceback.print_exc() + if not globals()['_GLOBAL_DONE']: + traceback.print_exc() except: pass