Remove 'import thread' entirely and replace thread.error by threading.ThreadError