Check attached

Hello,

Thanks for the work to make dockerpty work without the tty :)

I noticed however, that it will quit if you enter anything on stdin.

So I've got a change here to only hijack the tty for the streams that are set to be attached in the config for the container.
Yeah, exactly.

It means if it fails assigning try, the finally block will cover that exception with an exception saying flags doesn't exist, making it annoying to figure out why when it doesn't work.