While investigating 2927619 I found that killing a python session
with an active qt4 window generated Exceptions because callbacks
were being executed after their modules had been deleted. There
may be a cleaner solution than the one I implemented, which is
merely to catch the useless exceptions.