# HG changeset patch # User Brendan Cully # Date 2010-02-20 00:50:47 # 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 --git a/hgext/zeroconf/Zeroconf.py b/hgext/zeroconf/Zeroconf.py --- a/hgext/zeroconf/Zeroconf.py +++ b/hgext/zeroconf/Zeroconf.py @@ -863,7 +863,8 @@ class Engine(threading.Thread): try: self.readers[socket].handle_read() except: - traceback.print_exc() + if not globals()['_GLOBAL_DONE']: + traceback.print_exc() except: pass