Remove useless lock
Make code compatible with python-2.6

In python 2.6 Event.wait() always returns None making condition always True.