Fix undefined InterruptedError (python2 only)