Improve python2 support

InterruptedError is an OSError