SatelliteQE/robottelo — pull request #1404 by elyezer (2014-09-18 19:12:22+00:00)
Title: Improve ForemanTask.poll

Exceptions raised on other threads are not caught by the current thread.
Make the timer thread raise a KeyboardInterrupt on the main thread when
the polling timeout expires, then catch the exception and raise a
TaskTimeout exception instead.

Also polls for the task result of success or error instead of the
pending state that still pending even if the task have failed with an
error.